15 #pragma warning( disable : 4244 )
27 return (f >= 0) ? f : -f;
32 return (f ==
int(f)) ? f : (f > 0) ?
double(
int(f) + 1) :
double(
int(f));
47 return (f ==
int(f)) ? f : (f > 0) ?
double(
int(f)) :
double(
int(f) - 1);
67 return (f >= 0) ? double(
int(f + 0.5)) : double(-
int(0.5 - f));
72 return (f < 0) ? -1.0 : 1.0;
77 return (3.0 - 2.0 * f) * f * f;
87 return double(
int(f));
92 return (f > 0) ? 1.0 : (f < 0) ? -1.0 : 0.0;
112 inline double gmMax(
double f,
double g)
114 return (f > g) ? f : g;
117 inline double gmMin(
double f,
double g)
119 return (f < g) ? f : g;
124 double gmTmp = f; f = g; g = gmTmp;
129 int gmTmp = i; i = j; j = gmTmp;
134 inline void gmClamp(
double &f,
double l,
double h)
140 inline double gmLerp(
double f,
double l,
double h)
142 return l + ((h - l) * f );
145 inline double gmMax(
double f,
double g,
double h)
150 inline double gmMin(
double f,
double g,
double h)
155 inline double gmSlide(
double f,
double l,
double h)