Math utilities. More...
Functions | |
template<class T > | |
T | SPL::absVal (T x) |
The absolute value function. More... | |
template<class T > | |
T | SPL::signum (T x) |
The signum function. More... | |
template<class T > | |
T | SPL::sqr (const T &x) |
The square function. More... | |
template<class T > | |
T | SPL::clip (T x, T min, T max) |
The clip function. More... | |
double | SPL::sinc (double x) |
The cardinal sine function. More... | |
long | SPL::roundTowardZeroDiv (long x, long y) |
Compute a quotient with the result rounded towards zero. More... | |
long | SPL::floorDiv (long x, long y) |
Compute the floor of a quotient. More... | |
template<class T > | |
T | SPL::mod (T x, T y) |
Compute the remainder after division. More... | |
long | SPL::ceilDiv (long x, long y) |
Compute the ceiling of a quotient. More... | |
double | SPL::radToDeg (double x) |
Convert from radians to degrees. More... | |
double | SPL::degToRad (double x) |
Convert from degrees to radians. More... | |
Math utilities.
|
inline |
The absolute value function.
Returns: The absolute value of the quantity x is returned.
|
inline |
Compute the ceiling of a quotient.
Returns: The ceiling of x divided by y is returned.
|
inline |
The clip function.
|
inline |
Convert from degrees to radians.
Returns: The quantity x converted (from degrees) to radians is returned.
|
inline |
Compute the floor of a quotient.
Returns: The floor of x divided by y is returned.
|
inline |
Compute the remainder after division.
|
inline |
Convert from radians to degrees.
Returns: The quantity x converted (from radians) to degrees is returned.
|
inline |
Compute a quotient with the result rounded towards zero.
Returns: The floor of x divided by y is returned.
|
inline |
The signum function.
Returns: The signum of the quantity x is returned.
|
inline |
The cardinal sine function.
Returns: The sinc of x is returned.
T SPL::sqr | ( | const T & | x | ) |
The square function.
Returns: The square of the quantity x is returned.