|
BALL
1.5.0
|
Functions | |
| template<typename T > | |
| T | abs (const T &t) |
| template<typename T > | |
| T | frac (const T &t) |
| template<typename T > | |
| T | max (const T &a, const T &b) |
| template<typename T > | |
| T | max (const T &a, const T &b, const T &ct) |
| template<typename T > | |
| T | min (const T &a, const T &b) |
| template<typename T > | |
| T | min (const T &a, const T &b, const T &ct) |
| template<typename T > | |
| T | round (const T &t) |
| template<typename T > | |
| T | sgn (const T &t) |
| template<typename T > | |
| bool | isFinite (const T &t) |
| template<typename T > | |
| bool | isNan (const T &t) |
| template<typename T > | |
| bool | isInfinite (const T &t) |
| template<typename T > | |
| bool | isZero (const T &t) |
| template<typename T > | |
| bool | isNotZero (const T &t) |
| template<typename T1 , typename T2 > | |
| bool | isEqual (const T1 &a, const T2 &b) |
| template<typename T1 , typename T2 > | |
| bool | isNotEqual (const T1 &a, const T2 &b) |
| template<typename T1 , typename T2 > | |
| bool | isLess (const T1 &a, const T2 &b) |
| template<typename T1 , typename T2 > | |
| bool | isLessOrEqual (const T1 &a, const T2 &b) |
| template<typename T1 , typename T2 > | |
| bool | isGreaterOrEqual (const T1 &a, const T2 &b) |
| template<typename T1 , typename T2 > | |
| bool | isGreater (const T1 &a, const T2 &b) |
| template<typename T > | |
| long | floor (const T &t) |
| template<typename T > | |
| long | ceiling (const T &t) |
| template<typename T1 , typename T2 > | |
| Index | compare (const T1 &a, const T2 &b) |
| template<typename T > | |
| bool | isNear (const T &a, const T &b, const T &max_diff) |
| double | rint (double x) |
| round to integral value in floating-point format More... | |
|
inline |
Return the absolute value of a number.
| t | the number |
Definition at line 50 of file MATHS/common.h.
|
inline |
Return the ceiling of a number.
| t | the number |
Definition at line 295 of file MATHS/common.h.
|
inline |
Compare two numbers to each other.
| a | the first number |
| b | the second number |
-1 a < b; 0 a = b; 1 a > b Definition at line 307 of file MATHS/common.h.
|
inline |
Return the floor of a number.
| t | the number |
Definition at line 284 of file MATHS/common.h.
|
inline |
Return the fraction of a number.
| t | the number |
Definition at line 61 of file MATHS/common.h.
|
inline |
Test whether a number is equal to another.
| a | the first number |
| b | the second number |
a and b is below Constants::EPSILON Definition at line 212 of file MATHS/common.h.
|
inline |
Test whether a number is finite.
| t | the number |
t is finite Definition at line 149 of file MATHS/common.h.
|
inline |
Test whether a number is greater compared to another.
| a | the first number |
| b | the second number |
a is greater than b Definition at line 273 of file MATHS/common.h.
|
inline |
Test whether a number is greater or equal compared to another.
| a | the first number |
| b | the second number |
a is greater or equal than b Definition at line 261 of file MATHS/common.h.
|
inline |
Test whether a number is infinite.
| t | the number |
t equals inf or -inf Definition at line 178 of file MATHS/common.h.
|
inline |
Test whether a number is less compared to another.
| a | the first number |
| b | the second number |
a is smaller than b Definition at line 236 of file MATHS/common.h.
|
inline |
Test whether a number is less or equal compared to another.
| a | the first number |
| b | the second number |
a is less or equal b Definition at line 249 of file MATHS/common.h.
|
inline |
Test whether a value is not a number.
| t | the number |
nan Definition at line 160 of file MATHS/common.h.
|
inline |
Test whether two numbers are close to each other.
| a | the first number |
| b | the second number |
| max_diff | the maximum allowed difference between the two numbers |
a and b is below max_diff Definition at line 320 of file MATHS/common.h.
|
inline |
Test whether a number is not equal to another.
| a | the first number |
| b | the second number |
a and b is at least Constants::EPSILON Definition at line 224 of file MATHS/common.h.
|
inline |
Test whether a number is not zero.
| t | the number |
t is at least Constants::EPSILON Definition at line 200 of file MATHS/common.h.
|
inline |
Test whether a number is zero.
| t | the number |
t is below Constants::EPSILON Definition at line 189 of file MATHS/common.h.
|
inline |
Return the greater of two numbers.
| a | the first number |
| b | the second number |
Definition at line 75 of file MATHS/common.h.
|
inline |
Return the greatest of three numbers.
| a | the first number |
| b | the second number |
| ct | the third number |
Definition at line 88 of file MATHS/common.h.
|
inline |
Return the smallest of two numbers.
| a | the first number |
| b | the second number |
Definition at line 102 of file MATHS/common.h.
|
inline |
Return the smallest of three numbers.
| a | the first number |
| b | the second number |
| ct | the third number |
Definition at line 115 of file MATHS/common.h.
round to integral value in floating-point format
Definition at line 327 of file MATHS/common.h.
|
inline |
Round a number and return the result.
| t | the number |
Definition at line 127 of file MATHS/common.h.
|
inline |
Return the sign of a number.
| t | the number |
-1 t < 0; 0 t = 0; 1 t > 0 Definition at line 138 of file MATHS/common.h.