Go to the documentation of this file.
45 # if defined(_WIN32) || defined(_WINDOWS) || defined(_MSC_VER)
48 # define PTEXAPI __declspec(dllexport)
50 # define PTEXAPI __declspec(dllimport)
100 union { uint32_t i;
float f; } u;
107 if (val==0)
return 0;
108 union { uint32_t i;
float f; } u;
111 if (e)
return (uint16_t)(e + (((u.i&0x7fffff) + 0x1000) >> 13));
126 using Ptex::PtexHalf;
#define PTEX_NAMESPACE_END
static uint32_t h2fTable[65536]
PtexHalf()
Default constructor, value is undefined.
PtexHalf & operator=(float val)
Half-precision (16-bit) floating-point type.
static uint16_t f2hTable[512]
static uint16_t fromFloat_except(uint32_t val)
Handle exceptional cases for half-to-float conversion.
static float toFloat(uint16_t h)
static uint16_t fromFloat(float val)
Portable fixed-width integer types.