Signal/Geometry Processing Library (SPL)  1.1.24
Math Utilities

Math utilities. More...

Functions

template<class T >
SPL::absVal (T x)
 The absolute value function. More...
 
template<class T >
SPL::signum (T x)
 The signum function. More...
 
template<class T >
SPL::sqr (const T &x)
 The square function. More...
 
template<class 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 >
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...
 

Detailed Description

Math utilities.

Function Documentation

template<class T >
T SPL::absVal ( x)
inline

The absolute value function.

Returns: The absolute value of the quantity x is returned.

long SPL::ceilDiv ( long  x,
long  y 
)
inline

Compute the ceiling of a quotient.

Returns: The ceiling of x divided by y is returned.

template<class T >
T SPL::clip ( x,
min,
max 
)
inline

The clip function.

double SPL::degToRad ( double  x)
inline

Convert from degrees to radians.

Returns: The quantity x converted (from degrees) to radians is returned.

long SPL::floorDiv ( long  x,
long  y 
)
inline

Compute the floor of a quotient.

Returns: The floor of x divided by y is returned.

template<class T >
T SPL::mod ( x,
y 
)
inline

Compute the remainder after division.

double SPL::radToDeg ( double  x)
inline

Convert from radians to degrees.

Returns: The quantity x converted (from radians) to degrees is returned.

long SPL::roundTowardZeroDiv ( long  x,
long  y 
)
inline

Compute a quotient with the result rounded towards zero.

Returns: The floor of x divided by y is returned.

template<class T >
T SPL::signum ( x)
inline

The signum function.

Returns: The signum of the quantity x is returned.

double SPL::sinc ( double  x)
inline

The cardinal sine function.

Returns: The sinc of x is returned.

template<class T >
T SPL::sqr ( const T &  x)

The square function.

Returns: The square of the quantity x is returned.