fs::mth Namespace Reference


Detailed Description

Math toolkit.


Classes

class  Rec2_T
 Rectangle representation (incomplete). More...
class  Vec2_T
 Two dimensional vector representation (incomplete). More...

Typedefs

typedef float fixed
 Fixed-point floating number representation.
typedef Vec2_T< int > Vec2i_t
typedef Vec2_T< float > Vec2f_t
typedef Vec2_T< fixedVec2x_t
typedef Rec2_T< int > Rec2i_t
typedef Rec2_T< float > Rec2f_t
typedef Rec2_T< fixedRec2x_t

Functions

template<typename T>
Min (T tVal1, T tVal2)
template<typename T>
Max (T tVal1, T tVal2)
template<typename T>
Clamp (T tVal, T tMinVal, T tMaxVal)
template<typename T>
Abs (T tVal)
template<typename T>
Sgn (T tVal)
template<typename T>
Floor (T tVal)
float Sin (float fAngle)
float Cos (float fAngle)
void SinCos (float tAngle, float &tSin, float &tCos)
template<typename T>
Sqrt (T tVal)
template<typename T>
SqrtInv (T tVal)
template<typename T>
Norm (T tVal, T tMin, T tMax)
int Norm0_360 (int nVal)
float Norm0_360 (float fVal)
template<typename T>
Vec2_T< T > operator * (T t, const Vec2_T< T > &RHS)

Variables

const float EPS = 1.192092896e-07f
const float PI = 3.14159265358979323846f
const float PI360 = 2.0f * PI
const float PI90 = .5f * PI
const float PI45 = .25f * PI
const float DEG2RAD = PI / 180.0f
const float RAD2DEG = 180.0f / PI


Typedef Documentation

typedef float fs::mth::fixed

Fixed-point floating number representation.

Definition at line 24 of file fsFixed.h.

typedef Vec2_T<int> fs::mth::Vec2i_t

Definition at line 26 of file fsTypes.h.

typedef Vec2_T<float> fs::mth::Vec2f_t

Definition at line 27 of file fsTypes.h.

typedef Vec2_T<fixed> fs::mth::Vec2x_t

Definition at line 28 of file fsTypes.h.

typedef Rec2_T<int> fs::mth::Rec2i_t

Definition at line 29 of file fsTypes.h.

typedef Rec2_T<float> fs::mth::Rec2f_t

Definition at line 30 of file fsTypes.h.

typedef Rec2_T<fixed> fs::mth::Rec2x_t

Definition at line 31 of file fsTypes.h.


Function Documentation

template<typename T>
T fs::mth::Min ( tVal1,
tVal2 
) [inline]

Definition at line 28 of file fsFunc.h.

template<typename T>
T fs::mth::Max ( tVal1,
tVal2 
) [inline]

Definition at line 34 of file fsFunc.h.

template<typename T>
T fs::mth::Clamp ( tVal,
tMinVal,
tMaxVal 
) [inline]

Definition at line 40 of file fsFunc.h.

template<typename T>
T fs::mth::Abs ( tVal  )  [inline]

Definition at line 46 of file fsFunc.h.

template<typename T>
T fs::mth::Sgn ( tVal  )  [inline]

Definition at line 52 of file fsFunc.h.

template<typename T>
T fs::mth::Floor ( tVal  )  [inline]

Definition at line 59 of file fsFunc.h.

float fs::mth::Sin ( float  fAngle  )  [inline]

Definition at line 64 of file fsFunc.h.

float fs::mth::Cos ( float  fAngle  )  [inline]

Definition at line 69 of file fsFunc.h.

void fs::mth::SinCos ( float  tAngle,
float &  tSin,
float &  tCos 
) [inline]

Definition at line 74 of file fsFunc.h.

template<typename T>
T fs::mth::Sqrt ( tVal  )  [inline]

Definition at line 81 of file fsFunc.h.

template<typename T>
T fs::mth::SqrtInv ( tVal  )  [inline]

Definition at line 87 of file fsFunc.h.

References Sqrt().

Here is the call graph for this function:

template<typename T>
T fs::mth::Norm ( tVal,
tMin,
tMax 
) [inline]

Definition at line 93 of file fsFunc.h.

References Floor().

Here is the call graph for this function:

int fs::mth::Norm0_360 ( int  nVal  )  [inline]

Definition at line 99 of file fsFunc.h.

float fs::mth::Norm0_360 ( float  fVal  )  [inline]

Definition at line 104 of file fsFunc.h.

template<typename T>
Vec2_T<T> fs::mth::operator * ( t,
const Vec2_T< T > &  RHS 
) [inline]

Definition at line 154 of file fsVec2.h.

References fs::mth::Vec2_T< T >::x, and fs::mth::Vec2_T< T >::y.


Variable Documentation

const float fs::mth::EPS = 1.192092896e-07f

Definition at line 23 of file fsConst.h.

const float fs::mth::PI = 3.14159265358979323846f

Definition at line 24 of file fsConst.h.

const float fs::mth::PI360 = 2.0f * PI

Definition at line 25 of file fsConst.h.

const float fs::mth::PI90 = .5f * PI

Definition at line 26 of file fsConst.h.

const float fs::mth::PI45 = .25f * PI

Definition at line 27 of file fsConst.h.

const float fs::mth::DEG2RAD = PI / 180.0f

Definition at line 28 of file fsConst.h.

const float fs::mth::RAD2DEG = 180.0f / PI

Definition at line 29 of file fsConst.h.


FipS' Code (Thu Feb 15 22:43:48 2007) - (c) Filip STOKLAS (FipS) - [ www ] [ Guest Book ]