Main Page   Class Hierarchy   Compound List   File List   Compound Members  

freecloth::BaMath Class Reference

Container for a variety of useful mathematics functions. More...

#include <freecloth/base/baMath.h>

List of all members.

Static Public Methods

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 ()
 Returns a 32-bit value containing random bits, according to a a pseudo-random uniform distribution.

UInt32 randomUInt32 (UInt32 nbVals)
 Returns a 32-bit value in the range [0,nbVals) using a pseudo-random uniform distribution.

Float randomFloat ()
 Returns a value between 0 and 1, in a pseudo-random uniform distribution.

Int8 ceilInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int8 floorInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int8 roundInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt8 ceilUInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt8 floorUInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt8 roundUInt8 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int16 ceilInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int16 floorInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int16 roundInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt16 ceilUInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt16 floorUInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt16 roundUInt16 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int32 ceilInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int32 floorInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

Int32 roundInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt32 ceilUInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt32 floorUInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

UInt32 roundUInt32 (Float)
 Note that no truncation is performed. If the value is out of range, it will be wrapped around.

bool isEqual (Float a, Float b, Float tol=TOLERANCE)
 Values a and b are considered equal if they differ by less than the tolerance.

bool isGreater (Float a, Float b, Float tol=TOLERANCE)
 Values a and b are considered equal if they differ by less than the tolerance.

bool isLess (Float a, Float b, Float tol=TOLERANCE)
 Values a and b are considered equal if they differ by less than the tolerance.


Static Public Attributes

const Float TOLERANCE = 10e-4f


Detailed Description

Container for a variety of useful mathematics functions.

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.


The documentation for this class was generated from the following files:
Generated on Fri May 2 13:04:26 2003 for Freecloth by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002