|
static Int | abs (Int x) |
| Get absolute value of signed integer. More...
|
|
static UInt | abs (UInt x) |
| Get absolute value of unsigned integer. More...
|
|
static Real | abs (Real x) |
| Get absolute value of real number. More...
|
|
static Int | sign (Int x) |
| Get sign of number {-1,0,1}. More...
|
|
static UInt | sign (UInt x) |
|
static Real | sign (Real x) |
|
static Real | ceil (Real x) |
| Round up to the nearest whole number towards +inf. More...
|
|
static Real | floor (Real x) |
| Round down to the nearest whole number towards -inf. More...
|
|
static Real | round (Real x) |
| Round to the nearest whole number. More...
|
|
static Real | trunc (Real x) |
| Remove fractional part, leaving just the whole number. More...
|
|
static Real | frac (Real x) |
| Remove the whole part, leaving just the fraction. More...
|
|
static Real | mod (Real x, Real y) |
| Modulo, same as x % y. Returns remainder of division: x/y. More...
|
|
static Real | modNormalize (Real mod, Real val) |
| Get an equivalent value in the normalized modular interval [-mod, mod]. More...
|
|
static Real | modDistSigned (Real mod, Real x, Real y) |
| Calc smallest signed distance between two normalized values in a modular field. More...
|
|
template<class Num > |
static Num | sqr (Num x) |
| Square. More...
|
|
static Real | sqrt (Real x) |
| Square Root. More...
|
|
static Real | sqrtInv (Real x) |
| Inverse Square Root. More...
|
|
static Real | exp (Real x) |
| Euler's number e raised to exponent x (e^x) More...
|
|
static Real | expm1 (Real x) |
| exp(x) - 1, more accurate than exp() for small values of x. More...
|
|
static Real | pow (Real x, Real y) |
| x raised to exponent y More...
|
|
static Real | log (Real x) |
| Natural logarithm. ie. ln(x) More...
|
|
static Real | log (Real x, Real base) |
| Logarithm with base number. More...
|
|
static Real | log1p (Real x) |
| log(1 + x), more accurate than log() for small values of x. More...
|
|
template<class Num , class Num2 > |
static std::common_type< Num, Num2 >::type | min (Num a, Num2 b) |
| Get the minimum of two numbers. More...
|
|
template<class Num , class Num2 > |
static std::common_type< Num, Num2 >::type | max (Num a, Num2 b) |
| Get the maximum of two numbers. More...
|
|
template<class Num , class Num2 , class Num3 > |
static std::common_type< Num, Num2, Num3 >::type | clamp (Num val, Num2 min, Num3 max) |
| Ensure that a number is within a range. More...
|
|
static bool | isNan (Real x) |
| Returns true if real is not a number. More...
|
|
static bool | isNear (Int a, Int b, Int tol) |
| Check whether two numbers are near each other, given a tolerance. More...
|
|
static bool | isNear (Real a, Real b, Real tol=Real_::zeroTol) |
|
static bool | isNearZero (Real val, Real tol=Real_::zeroTol) |
| Check whether a number is close to zero. More...
|
|
template<class Num , class Num2 , class Num3 > |
static bool | isInRange (Num val, Num2 min, Num3 max) |
| Check if value is within min/max inclusive range. More...
|
|
static Real | hypot (Real a, Real b) |
| Get the hypotenuse of a right angle triangle with side lengths a and b . This method is more numerically stable than the direct approach: sqrt(a*a + b*b) More...
|
|
static tuple< bool, Real, Real > | solve (Real a, Real b, Real c, Real d, Real u, Real v) |
| Solve an equation pair using Gauss-Jordan elimination. More...
|
|