37#define L1_CACHE_LINE_SIZE 64
40#define INTFLOORF(s) (lrintf( (s) - (0.5f - FLT_EPSILON) ))
42#define INTFLOORF(s) ((int)( floor(s) ))
96 memcpy( &ui, &f,
sizeof(
float ) );
106 memcpy( &f, &ui,
sizeof (uint32_t ) );
116 memcpy( &ui, &f,
sizeof(
double ) );
126 memcpy( &f, &ui,
sizeof( uint64_t ) );
135 if( std::isinf( v ) && (v > 0.) )
156 if( std::isinf( v ) && (v < 0.) )
uint32_t FloatToBits(float f)
This part contains some functions from the PBRT 3 source code.
float NextFloatDown(float v)
float NextFloatUp(float v)
float BitsToFloat(uint32_t ui)
void Fast_srand(unsigned int seed)