#include <OpenGUI_Math.h>
This math lib exists so that the function they represent can be replaced with high speed alternatives or hardware acceleration where appropriate.
Static Public Member Functions | |
| static float | DegreesToRadians (float degrees) |
| converts degrees into radians | |
| static float | RadiansToDegrees (float radians) |
| converts radians into degrees | |
| static float | Sin (float fValue) |
| sine | |
| static float | Cos (float fValue) |
| cosine | |
| static float | Tan (float fValue) |
| tangent | |
| static float | ASin (float fValue) |
| arc sine | |
| static float | ACos (float fValue) |
| arc cosine | |
| static float | ATan (float fValue) |
| arc tangent | |
| static float | ATan2 (float fY, float fX) |
| arc tangent of y/x | |
| static float | Ceil (float fValue) |
| ceiling | |
| static float | Floor (float fValue) |
| floor | |
| static float | Exp (float fValue) |
| exponential | |
| static float | FAbs (float fValue) |
| absolute value of floating-point | |
| static float | FMod (float fX, float fY) |
| floating point modular division | |
| static float | Log (float fValue) |
| natural logarithm | |
| static float | Pow (float fBase, float fExponent) |
| numeric power | |
| static float | Sqr (float fValue) |
| square | |
| static float | Sqrt (float fValue) |
| square root | |
| static float | InvSqrt (float fValue) |
| inverse square root | |
| static float | AngleOfPoint (float x, float y) |
| Returns the angle from the origin to the given point, in float radians. | |
Static Public Attributes | |
| static const float | PI = float( 4.0 * atan( 1.0 ) ) |
| value for Pi | |
| static const float | TWO_PI = float( 2.0 * Math::PI ) |
| value for 2 * Pi | |
| static const float | HALF_PI = float( 0.5 * Math::PI ) |
| value for Pi / 2 | |
|
|
arc cosine
|
|
||||||||||||
|
Returns the angle from the origin to the given point, in float radians.
|
|
|
arc sine
|
|
|
arc tangent
|
|
||||||||||||
|
arc tangent of y/x
|
|
|
ceiling
|
|
|
cosine
|
|
|
converts degrees into radians
|
|
|
exponential
|
|
|
absolute value of floating-point
|
|
|
floor
|
|
||||||||||||
|
floating point modular division
|
|
|
inverse square root
|
|
|
natural logarithm
|
|
||||||||||||
|
numeric power
|
|
|
converts radians into degrees
|
|
|
sine
|
|
|
square
|
|
|
square root
|
|
|
tangent
|
|
|
value for Pi / 2
|
|
|
value for Pi
|
|
|
value for 2 * Pi
|