24 #ifndef __UT_SafeFloat__
25 #define __UT_SafeFloat__
31 UTpackIntToSafeFloat(
int input)
60 const int explength = infiniteexp - startexp;
66 output.
uval |= (startencoded + input);
82 if (input >= oneencoded)
83 input = oneencoded - 1;
90 UTunpackIntFromSafeFloat(
float input)
105 const int explength = infiniteexp - startexp;
111 if (output.
uval >= oneencoded && output.
uval <= startencoded)
117 if (output.
uval > startencoded)
119 output.
uval -= startencoded;
123 if (output.
uval >= length)
124 output.
uval = length-1;
126 return negative ? -output.
ival : output.
ival;
136 if (output.
uval >= oneencoded)
137 output.
uval = oneencoded - 1;
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
T negative(const T &val)
Return the unary negation of the given value.
GLuint GLsizei GLsizei * length
IMATH_NAMESPACE::V2f float