14 #ifndef __SYS_Floor_H__
15 #define __SYS_Floor_H__
44 static constexpr
int32
46 static constexpr
int64
52 static constexpr
int32
54 static constexpr
int64
65 shift = (tmp.
uval >> 23) & 0xff;
69 tmp.
fval = (tmp.
uval > 0x80000000) ? -1.0F : 0.0F;
71 else if (shift < 0x96)
73 unsigned mask = 0xffffffff << (0x96 - shift);
74 if (tmp.
uval & 0x80000000)
76 if ((tmp.
uval & ~mask) & 0x7fffff)
91 template <
typename T,
typename S>
93 SYSsplitFloatT(T &
val, S &ival)
109 { SYSsplitFloatT(val, ival); }
111 { SYSsplitFloatT(val, ival); }
113 { SYSsplitFloatT(val, ival); }
115 { SYSsplitFloatT(val, ival); }
117 { SYSsplitFloatT(val, ival); }
119 { SYSsplitFloatT(val, ival); }
121 { SYSsplitFloatT(val, ival); }
123 { SYSsplitFloatT(val, ival); }
130 template <
typename REAL_TYPE,
typename INT_TYPE>
132 SYSfastSplitFloat(REAL_TYPE &
val, INT_TYPE &ival)
134 ival = SYSfastFloor(val);
135 val -= REAL_TYPE(ival);
147 #if defined(WIN32) || defined(LINUX)
fpreal32 SYSfracIL(fpreal32 val)
IMATH_HOSTDEVICE constexpr int floor(T x) IMATH_NOEXCEPT
GLboolean GLboolean GLboolean GLboolean a
SYS_API fpreal64 SYSniceNumber(fpreal64 num, int digits=6)
SYS_API fpreal32 SYSfrac(fpreal32 val)
fpreal32 SYSceilIL(fpreal32 val)
SYS_API fpreal32 SYSfloor(fpreal32 val)
fpreal32 SYSrint(fpreal32 val)
IMATH_HOSTDEVICE constexpr int ceil(T x) IMATH_NOEXCEPT
fpreal32 SYSfloorIL(fpreal32 val)
SYS_API fpreal32 SYSceil(fpreal32 val)