Pyrogenesis  13997
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Functions
bits.cpp File Reference
#include "precompiled.h"
#include "lib/bits.h"

Go to the source code of this file.

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).

Definition at line 37 of file bits.cpp.

static u32 get_float_bits ( const float  x)
inlinestatic

Definition at line 30 of file bits.cpp.