Functions | |
| float | DegToRad (const float °) |
| Converts angle in degrees to radians. | |
| float | RadToDeg (const float &rad) |
| Converts angle in radians to degrees. | |
| float | FloatClampNormalize (const float &number) |
| Clamp given number to range <0,1> Compute:. | |
| float | FloatClamp (const float &value, const float &min, const float &max) |
| Clamp given value to specified range <min, max>. | |
| template<typename T> | |
| void | Swap (T &a, T &b) |
| This template swaps two values. | |
| template<typename T> | |
| void | MinMax (const T &a, const T &b, T &min, T &max) |
| This template finds minimum and maximum from A,B. | |
| template<typename T> | |
| void | MinMidMax (const T &a, const T &b, const T &c, T &min, T &mid, T &max) |
| This template finds minimum, middle and maximum from A,B,C. | |
| template<typename T> | |
| void | Max (const T &a, const T &b, const T &c, T &max) |
| This method finds maximum from three values. | |
| template<typename T> | |
| void | Min (const T &a, const T &b, const T &c, T &min) |
| This method finds minimum from three values. | |
| template<typename T> | |
| T | Min (const T &a, const T &b) |
| Compare two values and return minimum. | |
| template<typename T> | |
| T | Max (const T &a, const T &b) |
| Compare two values and return maximum. | |
Variables | |
| const float | PI = 3.1415926535897932384626433832795f |
| definition of PI | |
| const float | E = 2.7182818284590452353602874713527f |
| definition of E | |
It contains small routines which are usually used. Also some constants are contained here.
Not all function in this namespace has special optimization. They are only used for simplifying some tasks.
|
|
Converts angle in degrees to radians. Compute (deg/180.f)*PI
Definition at line 38 of file Routines.h. References PI. |
|
||||||||||||||||
|
Clamp given value to specified range <min, max>.
Definition at line 113 of file Routines.h. Referenced by NSMath::NSCurves::THermiteCubicSpline::GetIndexByTime(), and NSMath::TEulerAngles::Set(). |
|
|
Clamp given number to range <0,1> Compute:.
if(number<0.f) { return 0.f; } else { if(number>1.f) return 1.f; else return number; }
Definition at line 76 of file Routines.h. Referenced by NSMath::NSCurves::THermiteCubicSpline::GetIndexByUniformTime(). |
|
||||||||||||||||
|
Compare two values and return maximum.
Definition at line 258 of file Routines.h. |
|
||||||||||||||||||||||||
|
This method finds maximum from three values.
Definition at line 217 of file Routines.h. Referenced by NSMath::TTriangle::GetMaxX(), NSMath::TTriangle::GetMaxY(), NSMath::TTriangle::GetMaxZ(), and NSMath::TVector3::Maximum(). |
|
||||||||||||||||
|
Compare two values and return minimum.
Definition at line 247 of file Routines.h. |
|
||||||||||||||||||||||||
|
This method finds minimum from three values.
Definition at line 234 of file Routines.h. Referenced by NSMath::TTriangle::GetMinX(), NSMath::TTriangle::GetMinY(), NSMath::TTriangle::GetMinZ(), and NSMath::TVector3::Minimum(). |
|
||||||||||||||||||||||||
|
This template finds minimum and maximum from A,B.
Definition at line 155 of file Routines.h. Referenced by NSMath::TVector3::MinimumMaximum(). |
|
||||||||||||||||||||||||||||||||
|
This template finds minimum, middle and maximum from A,B,C.
Definition at line 181 of file Routines.h. |
|
|
Converts angle in radians to degrees. Compute (rad/PI)*180.f
Definition at line 50 of file Routines.h. References PI. |
|
||||||||||||||||
|
This template swaps two values. Value type must have defined assignment operator.
Definition at line 138 of file Routines.h. Referenced by NSMath::TMatrix4::Transpose(), and NSMath::TMatrix3::Transpose(). |
|
|
definition of E
Definition at line 29 of file Routines.h. |
|
|
definition of PI
Definition at line 28 of file Routines.h. Referenced by DegToRad(), RadToDeg(), and NSRandom::TRandomNormal::Random(). |
1.4.6-NO