|
template<typename TYPE > |
static bool | IsSignDiff (TYPE a, TYPE b) noexcept |
|
template<typename TYPE > |
static TYPE | WrapRadians (TYPE nRadians) noexcept |
|
template<typename TYPE > |
static TYPE | WrapRadiansSigned (TYPE nRadians) noexcept |
|
template<typename TYPE > |
static TYPE | GetDiffRadians (TYPE n1, TYPE n2) noexcept |
|
template<typename TYPE > |
static TYPE | Degree2Radian (TYPE nDegree) noexcept |
|
template<typename TYPE > |
static TYPE | Radian2Degree (TYPE nRadians) noexcept |
|
template<typename TYPE > |
static TYPE | Lerp (TYPE nVal1, TYPE nVal2, TYPE fRatio) noexcept |
|
template<typename TYPE > |
static TYPE | Round (TYPE a) |
|
template<typename TYPE > |
static bool | IsInteger (TYPE a) |
|
template<typename TYPE > |
static TYPE | Floor (TYPE a) |
| get the closest whole integer. positive or negative values. More...
|
|
template<typename TYPE > |
static TYPE | Ceil (TYPE a) |
|
template<typename TYPE > |
static TYPE | Sqrt (TYPE a) |
|
template<typename TYPE > |
static TYPE | Sin (TYPE a) |
|
template<typename TYPE > |
static TYPE | Cos (TYPE a) |
|
template<typename TYPE > |
static TYPE | Tan (TYPE a) |
|
template<typename TYPE > |
static void | SinCos (TYPE a, TYPE &s, TYPE &c) |
| get both sin and cos at one time. a = Euler angle in radians More...
|
|
template<typename TYPE > |
static TYPE | ASin (TYPE a) |
|
template<typename TYPE > |
static TYPE | ACos (TYPE a) |
|
template<typename TYPE > |
static TYPE | ATan (TYPE a) |
|
template<typename TYPE > |
static TYPE | ATan2 (TYPE y, TYPE x) |
|
template<typename TYPE > |
static TYPE | Exp (TYPE a) |
|
template<typename TYPE > |
static TYPE | Log (TYPE a) |
| Natural (e) log. // negative will throw ? More...
|
|
template<typename TYPE > |
static TYPE | Pow (TYPE nBase, TYPE nExp) |
| pow(nBase,nExp) = exp( log(nBase) * nExp ); More...
|
|
template<typename TYPE > |
static TYPE | Pow10 (TYPE x) |
|
template<typename TYPE > |
static TYPE | Pow2 (TYPE x) |
|
template<typename TYPE > |
static TYPE | Log10 (TYPE a) |
|
template<typename TYPE > |
static TYPE | Log2 (TYPE a) |
|
template<typename TYPE > |
static TYPE | LogN (TYPE x, TYPE b=10) |
|
template<> |
float | Floor (float a) |
|
template<> |
float | Ceil (float a) |
|
template<> |
float | Sqrt (float a) |
|
template<> |
float | Sin (float a) |
|
template<> |
float | Cos (float a) |
|
template<> |
float | Tan (float a) |
|
template<> |
void | SinCos (float a, float &s, float &c) |
|
template<> |
float | ASin (float a) |
|
template<> |
float | ACos (float a) |
|
template<> |
float | ATan (float a) |
|
template<> |
float | ATan2 (float y, float x) |
|
template<> |
float | Log (float a) |
|
template<> |
float | Log10 (float a) |
|
template<> |
float | Exp (float a) |
|
template<> |
float | Pow (float a, float nExp) |
|
template<> |
double | Floor (double a) |
|
template<> |
double | Ceil (double a) |
|
template<> |
double | Sqrt (double a) |
|
template<> |
double | Sin (double a) |
|
template<> |
double | Cos (double a) |
|
template<> |
double | Tan (double a) |
|
template<> |
void | SinCos (double a, double &s, double &c) |
|
template<> |
double | ASin (double a) |
|
template<> |
double | ACos (double a) |
|
template<> |
double | ATan (double a) |
|
template<> |
double | ATan2 (double y, double x) |
|
template<> |
double | Log (double a) |
|
template<> |
double | Log10 (double a) |
|
template<> |
double | Exp (double a) |
|
template<> |
double | Pow (double a, double nExp) |
|
template<typename TYPE > |
static int | Sign (TYPE a) |
|
template<typename TYPE > |
static bool | IsInRange (TYPE n, TYPE low, TYPE high) noexcept |
|
template<typename TYPE > |
static bool | IsInBetween (TYPE n, TYPE a, TYPE b) noexcept |
|
template<typename TYPE > |
static TYPE | Min (TYPE a, TYPE b) noexcept |
|
template<typename TYPE > |
static TYPE | Max (TYPE a, TYPE b) noexcept |
|
template<typename TYPE > |
static TYPE | Max3 (TYPE a, TYPE b, TYPE c) noexcept |
|
template<typename TYPE > |
static TYPE | Clamp (TYPE value, TYPE low, TYPE high) |
|
template<typename TYPE > |
static void | ClampRef (TYPE &rValue, TYPE low, TYPE high) |
|
template<typename TYPE > |
static bool | IsNear (TYPE n1, TYPE n2, TYPE nDiff=(TYPE) k_FLT_MIN2) noexcept |
|
template<typename TYPE > |
static TYPE | Sqr (TYPE a) noexcept |
|
template<typename TYPE > |
static TYPE | Abs (TYPE a) noexcept |
| similar to ABS(n) macro. Does nothing for unsigned types. More...
|
|
template<typename TYPE > |
static TYPE | Mod (TYPE a, TYPE b) |
| a modulus b = remainder of a/b More...
|
|
template<typename TYPE > |
static TYPE | Wrap (TYPE nVal, TYPE nMod) |
|
static bool | IsSignDiff (int a, int b) noexcept |
|
template<typename TYPE > |
static TYPE | GetGreatestCommonDivisor (TYPE x, TYPE y) |
|
template<typename TYPE > |
static TYPE | MulDiv (TYPE a, TYPE b, TYPE c) |
|
template<typename TYPE > |
static TYPE | DivideUp (TYPE a, TYPE b) |
|
template<typename TYPE > |
static TYPE | AddC (TYPE a, TYPE b, bool &bCarry) noexcept |
|
template<typename TYPE > |
static TYPE | SubC (TYPE a, TYPE b, bool &bBorrow) noexcept |
|
template<typename TYPE > |
static bool | ToBool (TYPE nVal) noexcept |
|
static int GRAYCALL | Log2Est (UINT iVal) |
|
static Percent10_t GRAYCALL | GetSCurve (int iValDiff, int iValVarianceHalf) |
|
static Percent10_t GRAYCALL | GetBellCurve (int iValDiff, int iValVarianceHalf) |
|
template<> |
float | Abs (float a) noexcept |
|
template<> |
float | Mod (float a, float b) |
|
template<> |
double | Abs (double a) noexcept |
|
template<> |
double | Mod (double a, double b) |
|
template<> |
int | Abs (int a) noexcept |
|
template<> |
int | Mod (int a, int b) |
|
template<> |
UINT | Abs (UINT a) noexcept |
|
template<> |
UINT | Mod (UINT a, UINT b) |
|
template<> |
UINT16 | MulDiv (UINT16 a, UINT16 b, UINT16 c) |
|
template<typename TYPE > |
static bool | IsNaN (TYPE a) noexcept |
|
template<typename TYPE > |
static bool | IsInfinite (TYPE a) |
|
template<typename TYPE > |
static bool | IsFinite (TYPE a) noexcept |
|
math templates that only work for float/double types.
- Note
- use of template/namespace Math<> would conflict with System.Math in M$ CLR bool IsPostive() IsNegative() ?
-
see js_fdlibm for more source for math primitives. sin,cos,ln,etc.