Floating point utility routines
Files | |
file | csqint.h |
Quick floating point to integer conversions. | |
Functions | |
long | csQint (double inval) |
Truncate the fractional part of a floating-point value and convert to integer. | |
long | csQround (double inval) |
Round a floating-point value and convert to integer. | |
long | csQint8 (float inval) |
Convert a floating-point number to 24.8 fixed-point value. | |
long | csQint16 (float inval) |
Convert a floating-point number to 16.16 fixed-point value. | |
long | csQint24 (float inval) |
Convert a floating-point number to 8.24 fixed-point value. | |
float | csQsqrt (float x) |
This routine computes sqrt(x) very quickly on Intel and PowerPC platforms. | |
float | csQisqrt (float x) |
This routine is basically equivalent to csQsqrt() except that it returns 1/sqrt(x) rather than the proper square root. |
Function Documentation
|
Truncate the fractional part of a floating-point value and convert to integer.
Definition at line 142 of file csqint.h. Referenced by csG2DDrawLine< Tpixel, Tpixmixer >::DrawLine(). |
|
Convert a floating-point number to 16.16 fixed-point value.
Definition at line 219 of file csqint.h. Referenced by csG2DDrawLine< Tpixel, Tpixmixer >::DrawLine(). |
|
Convert a floating-point number to 8.24 fixed-point value.
|
|
Convert a floating-point number to 24.8 fixed-point value.
|
|
This routine is basically equivalent to csQsqrt() except that it returns 1/sqrt(x) rather than the proper square root. It should be used anywhere you need the inverse root (in 3D graphics it is a common situation), because the routine is a little faster than csQsqrt() and also you avoid a division. Definition at line 212 of file csqsqrt.h. Referenced by csQuaternion::Normalize(). |
|
Round a floating-point value and convert to integer.
|
|
This routine computes sqrt(x) very quickly on Intel and PowerPC platforms.
|
Generated for Crystal Space by doxygen 1.3.9.1