#include <freecloth/base/baMath.h>
Static Public Member Functions | |
Float | ceil (Float) |
Float | floor (Float) |
Float | round (Float) |
Int8 | roundTruncInt8 (Float) |
This will cap values to the range [-128,127]. | |
UInt8 | roundTruncUInt8 (Float) |
This will cap values to the range [0,255]. | |
Int16 | roundTruncInt16 (Float) |
This will cap values to the range [-32768,32767]. | |
UInt16 | roundTruncUInt16 (Float) |
This will cap values to the range [0,65535]. | |
Float | abs (Float) |
bool | isInteger (Float) |
Returns true if input is an integer (or within tolerance). | |
bool | isPow2 (UInt32) |
Returns true if input is a power of two. | |
UInt32 | roundUpPow2 (UInt32) |
Rounds input up to nearest power of two. | |
Float | sqr (Float) |
Float | sqrt (Float) |
Float | cos (Float) |
Float | sin (Float) |
Float | tan (Float) |
Float | arccos (Float) |
Float | arcsin (Float) |
Float | arctan (Float) |
Float | arctan2 (Float y, Float x) |
Float | sinc (Float) |
Float | exp (Float) |
Float | log (Float) |
UInt32 | randomUInt32 () |
UInt32 | randomUInt32 (UInt32 nbVals) |
Float | randomFloat () |
Int8 | ceilInt8 (Float) |
Int8 | floorInt8 (Float) |
Int8 | roundInt8 (Float) |
UInt8 | ceilUInt8 (Float) |
UInt8 | floorUInt8 (Float) |
UInt8 | roundUInt8 (Float) |
Int16 | ceilInt16 (Float) |
Int16 | floorInt16 (Float) |
Int16 | roundInt16 (Float) |
UInt16 | ceilUInt16 (Float) |
UInt16 | floorUInt16 (Float) |
UInt16 | roundUInt16 (Float) |
Int32 | ceilInt32 (Float) |
Int32 | floorInt32 (Float) |
Int32 | roundInt32 (Float) |
UInt32 | ceilUInt32 (Float) |
UInt32 | floorUInt32 (Float) |
UInt32 | roundUInt32 (Float) |
bool | isEqual (Float a, Float b, Float tol=TOLERANCE) |
bool | isGreater (Float a, Float b, Float tol=TOLERANCE) |
bool | isLess (Float a, Float b, Float tol=TOLERANCE) |
Static Public Attributes | |
const Float | TOLERANCE = 10e-4f |
This class is intended to provide clean platform-independent access to standard routines. It also groups a number of useful new routines, such as floating-point comparisons using tolerances.
Definition at line 50 of file baMath.h.
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 74 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 116 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 32 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 95 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 137 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 53 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 81 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 123 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 39 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 102 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 144 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 60 of file baMath.cpp. |
|
Values a and b are considered equal if they differ by less than the tolerance. Definition at line 270 of file baMath.cpp. Referenced by SimSimulator::setPosConstraintLine(). |
|
Values a and b are considered equal if they differ by less than the tolerance. Definition at line 277 of file baMath.cpp. |
|
Values a and b are considered equal if they differ by less than the tolerance. Definition at line 284 of file baMath.cpp. |
|
Returns a value between 0 and 1, in a pseudo-random uniform distribution. Definition at line 263 of file baMath.cpp. |
|
Returns a 32-bit value in the range [0,nbVals) using a pseudo-random uniform distribution. Definition at line 256 of file baMath.cpp. References randomUInt32(). |
|
Returns a 32-bit value containing random bits, according to a a pseudo-random uniform distribution. Definition at line 242 of file baMath.cpp. Referenced by randomUInt32(). |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 88 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 130 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 46 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 109 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 151 of file baMath.cpp. |
|
Note that no truncation is performed. If the value is out of range, it will be wrapped around. Definition at line 67 of file baMath.cpp. |