simgear/simgear/math/Math.hxx
timoore c7dab4abea rewrite of sky dome code
Add more points to the dome, giving it a dome shape rather than a
dunce cap shape.

Represent as OpenGL DrawElements instead of as triangle strips.

Only calculate have the sky colors and reflect those across the dome.
2008-04-14 21:44:21 +00:00

24 lines
399 B
C++

#ifndef SIMGEAR_MATH_MATH_HXX
#define SIMGEAR_MATH_MATH_HXX 1
namespace simgear
{
namespace math
{
/** Linear interpolation between two values.
*/
template<typename T>
inline T lerp(const T& x, const T& y, double alpha)
{
return x * (1.0 - alpha) + y * alpha;
}
template<typename T>
inline T lerp(const T& x, const T& y, float alpha)
{
return x * (1.0f - alpha) + y * alpha;
}
}
}
#endif