Pyrogenesis  trunk
Functions
bits.cpp File Reference
#include "precompiled.h"
#include "lib/bits.h"
Include dependency graph for bits.cpp:

Functions

static u32 get_float_bits (const float x)
 
int floor_log2 (const float x)
 floor(log2(f)) fast, uses the FPU normalization hardware. More...
 

Function Documentation

int floor_log2 ( const float  x)

floor(log2(f)) fast, uses the FPU normalization hardware.

Parameters
x(float) input; MUST be > 0, else results are undefined.
Returns
floor of the base-2 logarithm (i.e. rounded down).
static u32 get_float_bits ( const float  x)
inlinestatic