Signal/Geometry Processing Library (SPL)  1.1.24
math.hpp File Reference

This file contains various mathematical functions/code. More...

#include <SPL/config.hpp>
#include <iostream>
#include <cmath>
#include <cassert>
#include <boost/tr1/cmath.hpp>

Go to the source code of this file.

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

This file contains various mathematical functions/code.