Floating point utility routines
Files | |
file | csqint.h |
Quick floating point to integer conversions. | |
Functions | |
static long | csQfixed16 (float n) |
Quickly convert a floating-point number to 16.16 fixed-point value. | |
static long | csQfixed24 (float n) |
Quickly convert a floating-point number to 8.24 fixed-point value. | |
static long | csQfixed8 (float n) |
Quickly convert a floating-point number to 24.8 fixed-point value. | |
template<typename T > | |
static long | csQint (T n) |
Quickly truncate the fractional part of a floating-point value and convert it to a long integer using processor and/or number format quirks if available. | |
static float | csQisqrt (float x) |
This routine is basically equivalent to csQsqrt() except that it returns 1/sqrt(x) rather than the proper square root. | |
template<typename T > | |
static long | csQround (T n) |
Quickly round a floating-point value and convert it to a long integer using processor and/or number format quirks if available. | |
static float | csQsqrt (float x) |
This routine computes sqrt(x) very quickly on Intel and PowerPC platforms. |
Function Documentation
static inline long csQfixed16 | ( | float | n | ) | [inline, static] |
static inline long csQfixed24 | ( | float | n | ) | [inline, static] |
static inline long csQfixed8 | ( | float | n | ) | [inline, static] |
template<typename T >
static long csQint | ( | T | n | ) | [inline, static] |
static float csQisqrt | ( | float | x | ) | [static] |
template<typename T >
static long csQround | ( | T | n | ) | [inline, static] |
Generated for Crystal Space 2.0 by doxygen 1.6.1