Math Namespace Reference


Functions

template<typename T>
Vector2D< T > abs (const Vector2D< T > &vector)
 Return the absolute value of the specified vector, such that the every component is positive.
template<typename T>
Vector3D< T > abs (const Vector3D< T > &vector)
 Return the absolute value of the specified vector, such that the every component is positive.
template<typename T>
Vector4D< T > abs (const Vector4D< T > &vector)
 Return the absolute value of the specified vector, such that the every component is positive.
template<typename T>
Matrix2D< T > abs (const Matrix2D< T > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive.
template<typename T>
Matrix3D< T > abs (const Matrix3D< T > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive.
template<typename T>
Matrix4D< T > abs (const Matrix4D< T > &matrix)
 Return the absolute value of the specified matrix, such that the every component is positive.
template<typename T>
nan ()
 Return the Not-A-Number representation for the template parameter type.
template<typename T>
infinity ()
 Return the Infinity representation for the template parameter type.
template<typename T>
negativeInfinity ()
 Return the Negative Infinity representation for the template parameter type.
template<typename T>
max ()
 Return the maximum allowable finite value for the template parameter type.
template<typename T>
min ()
 Return the minimum allowable finite value for the template parameter type.
template<typename T>
bool isInfinity (T number)
 Get whether a number is equal to the representation of Infinity for its type.
template<typename T>
bool isNegativeInfinity (T number)
 Get whether a number is equal to the representation of Negative Infinity for its type.
template<>
bool isNegativeInfinity (unsigned char number)
template<>
bool isNegativeInfinity (unsigned short number)
template<>
bool isNegativeInfinity (unsigned int number)
template<>
bool isNegativeInfinity (unsigned long number)
template<>
bool isNegativeInfinity (unsigned long long number)
template<typename T>
bool isInfinite (T number)
 Get whether a number is equal to Negative or Positive Infinity for its type.
template<typename T>
isNAN (T number)
 Get whether or not the specified number is Not-A-Number.
template<typename T>
abs (T number)
 Return the absolute value of the specified number, such that the result is positive.
template<>
unsigned char abs (unsigned char value)
template<>
unsigned short abs (unsigned short value)
template<>
unsigned int abs (unsigned int value)
template<>
unsigned long abs (unsigned long value)
template<>
unsigned long long abs (unsigned long long value)
template<typename T>
int sign (T number)
 Return -1 if the number is less than zero, 0 if it is zero, and 1 otherwise.
template<>
int sign (unsigned char value)
template<>
int sign (unsigned short value)
template<>
int sign (unsigned int value)
template<>
int sign (unsigned long value)
template<>
int sign (unsigned long long value)
template<typename T>
static bool equals (T value1, T value2)
template<typename T>
static bool fuzzyEquals (T value1, T value2, T epsilon)
template<>
bool equals (float value1, float value2)
template<>
bool equals (double value1, double value2)
template<typename T>
max (T number1, T number2)
 Return the larger of the two parameter numbers.
template<typename T>
min (T value1, T value2)
 Return the smaller of the two parameter numbers.
template<typename T>
clamp (T number, T minimum, T maximum)
 Return the result when the a number is constrainted to the interval [minimum, maximum].
template<typename T>
static T floor (T number)
 Return the largest whole number smaller than the number parameter, as the same type.
template<typename T>
int intFloor (T number)
 Return the largest whole number smaller than the number parameter, as an integer type.
template<typename T>
static T ceiling (T number)
 Return the smallest whole number larger than the number parameter, as the same type.
template<typename T>
int intCeiling (T number)
 Return the smallest whole number larger than the number parameter, as an integer type.
template<typename T>
sqrt (T value)
template<typename T>
cos (T value)
template<typename T>
sin (T value)
template<typename T>
nextPowerOfTwo (T number)
 Get the first power of two larger than the specified number.
template<typename T>
pow (T base, T power)
template<typename T>
intPow (T base, int power)
template<typename T>
ln (T value)
template<typename T>
int intLn (T value)
template<typename T>
log10 (T value)
template<typename T>
int intLog10 (T value)
template<typename T>
radiansToDegrees (T number)
template<typename T>
degreesToRadians (T number)
void setRandomSeed (unsigned long seed)
float random ()
float randomFloat ()
template<typename T>
randomRange (T min, T max)
template<>
float randomRange (float min, float max)
template<>
double randomRange (double min, double max)

Variables

const double PI = 3.14159265358979323846
const double E = 2.71828182845904523536
static const float FLOAT_EPSILON = 0.00001f
static const double DOUBLE_EPSILON = 0.00000000001
static const double DEGREES_TO_RADIANS = Math::PI / 180.0
static const double RADIANS_TO_DEGREES = 180.0 / Math::PI
static unsigned long randomSeed = 1


Function Documentation

template<>
unsigned long long Math::abs ( unsigned long long  value  )  [inline]

template<>
unsigned long Math::abs ( unsigned long  value  )  [inline]

template<>
unsigned int Math::abs ( unsigned int  value  )  [inline]

template<>
unsigned short Math::abs ( unsigned short  value  )  [inline]

template<>
unsigned char Math::abs ( unsigned char  value  )  [inline]

template<typename T>
T Math::abs ( number  )  [inline]

Return the absolute value of the specified number, such that the result is positive.

template<typename T>
Matrix4D<T> Math::abs ( const Matrix4D< T > &  matrix  )  [inline]

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T>
Matrix3D<T> Math::abs ( const Matrix3D< T > &  matrix  )  [inline]

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T>
Matrix2D<T> Math::abs ( const Matrix2D< T > &  matrix  )  [inline]

Return the absolute value of the specified matrix, such that the every component is positive.

template<typename T>
Vector4D<T> Math::abs ( const Vector4D< T > &  vector  )  [inline]

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T>
Vector3D<T> Math::abs ( const Vector3D< T > &  vector  )  [inline]

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T>
Vector2D<T> Math::abs ( const Vector2D< T > &  vector  )  [inline]

Return the absolute value of the specified vector, such that the every component is positive.

template<typename T>
static T Math::ceiling ( number  )  [inline, static]

Return the smallest whole number larger than the number parameter, as the same type.

template<typename T>
T Math::clamp ( number,
minimum,
maximum 
) [inline]

Return the result when the a number is constrainted to the interval [minimum, maximum].

template<typename T>
T Math::cos ( value  )  [inline]

template<typename T>
T Math::degreesToRadians ( number  )  [inline]

template<>
bool Math::equals ( double  value1,
double  value2 
) [inline]

template<>
bool Math::equals ( float  value1,
float  value2 
) [inline]

template<typename T>
static bool Math::equals ( value1,
value2 
) [inline, static]

template<typename T>
static T Math::floor ( number  )  [inline, static]

Return the largest whole number smaller than the number parameter, as the same type.

template<typename T>
static bool Math::fuzzyEquals ( value1,
value2,
epsilon 
) [inline, static]

template<typename T>
T Math::infinity (  )  [inline]

Return the Infinity representation for the template parameter type.

template<typename T>
int Math::intCeiling ( number  )  [inline]

Return the smallest whole number larger than the number parameter, as an integer type.

template<typename T>
int Math::intFloor ( number  )  [inline]

Return the largest whole number smaller than the number parameter, as an integer type.

template<typename T>
int Math::intLn ( value  )  [inline]

template<typename T>
int Math::intLog10 ( value  )  [inline]

template<typename T>
T Math::intPow ( base,
int  power 
) [inline]

template<typename T>
bool Math::isInfinite ( number  )  [inline]

Get whether a number is equal to Negative or Positive Infinity for its type.

template<typename T>
bool Math::isInfinity ( number  )  [inline]

Get whether a number is equal to the representation of Infinity for its type.

template<typename T>
T Math::isNAN ( number  )  [inline]

Get whether or not the specified number is Not-A-Number.

template<>
bool Math::isNegativeInfinity ( unsigned long long  number  )  [inline]

template<>
bool Math::isNegativeInfinity ( unsigned long  number  )  [inline]

template<>
bool Math::isNegativeInfinity ( unsigned int  number  )  [inline]

template<>
bool Math::isNegativeInfinity ( unsigned short  number  )  [inline]

template<>
bool Math::isNegativeInfinity ( unsigned char  number  )  [inline]

template<typename T>
bool Math::isNegativeInfinity ( number  )  [inline]

Get whether a number is equal to the representation of Negative Infinity for its type.

template<typename T>
T Math::ln ( value  )  [inline]

template<typename T>
T Math::log10 ( value  )  [inline]

template<typename T>
T Math::max ( number1,
number2 
) [inline]

Return the larger of the two parameter numbers.

template<typename T>
T Math::max (  )  [inline]

Return the maximum allowable finite value for the template parameter type.

template<typename T>
T Math::min ( value1,
value2 
) [inline]

Return the smaller of the two parameter numbers.

template<typename T>
T Math::min (  )  [inline]

Return the minimum allowable finite value for the template parameter type.

template<typename T>
T Math::nan (  )  [inline]

Return the Not-A-Number representation for the template parameter type.

template<typename T>
T Math::negativeInfinity (  )  [inline]

Return the Negative Infinity representation for the template parameter type.

template<typename T>
T Math::nextPowerOfTwo ( number  )  [inline]

Get the first power of two larger than the specified number.

template<typename T>
T Math::pow ( base,
power 
) [inline]

template<typename T>
T Math::radiansToDegrees ( number  )  [inline]

float Math::random (  )  [inline]

float Math::randomFloat (  )  [inline]

template<>
double Math::randomRange ( double  min,
double  max 
) [inline]

template<>
float Math::randomRange ( float  min,
float  max 
) [inline]

template<typename T>
T Math::randomRange ( min,
max 
) [inline]

void Math::setRandomSeed ( unsigned long  seed  )  [inline]

template<>
int Math::sign ( unsigned long long  value  )  [inline]

template<>
int Math::sign ( unsigned long  value  )  [inline]

template<>
int Math::sign ( unsigned int  value  )  [inline]

template<>
int Math::sign ( unsigned short  value  )  [inline]

template<>
int Math::sign ( unsigned char  value  )  [inline]

template<typename T>
int Math::sign ( number  )  [inline]

Return -1 if the number is less than zero, 0 if it is zero, and 1 otherwise.

template<typename T>
T Math::sin ( value  )  [inline]

template<typename T>
T Math::sqrt ( value  )  [inline]


Variable Documentation

const double Math::DEGREES_TO_RADIANS = Math::PI / 180.0 [static]

const double Math::DOUBLE_EPSILON = 0.00000000001 [static]

const double Math::E = 2.71828182845904523536

const float Math::FLOAT_EPSILON = 0.00001f [static]

const double Math::PI = 3.14159265358979323846

const double Math::RADIANS_TO_DEGREES = 180.0 / Math::PI [static]

unsigned long Math::randomSeed = 1 [static]


Generated on Tue Aug 26 00:03:23 2008 for Rim Physics by  doxygen 1.5.4