Jet  v1.3.3
Namespaces | Functions
math_utils.h File Reference
#include <jet/macros.h>
#include <cstddef>
#include <limits>
#include "detail/math_utils-inl.h"

Go to the source code of this file.

Namespaces

 jet
 

Functions

template<typename T >
bool jet::similar (T x, T y, T eps=std::numeric_limits< T >::epsilon())
 Returns true if x and y are similar. More...
 
template<typename T >
jet::sign (T x)
 Returns the sign of the value. More...
 
template<typename T >
jet::min3 (T x, T y, T z)
 Returns the minimum value among three inputs. More...
 
template<typename T >
jet::max3 (T x, T y, T z)
 Returns the maximum value among three inputs. More...
 
template<typename T >
jet::minn (const T *x, size_t n)
 Returns minimum among n-elements. More...
 
template<typename T >
jet::maxn (const T *x, size_t n)
 Returns maximum among n-elements. More...
 
template<typename T >
jet::absmin (T x, T y)
 Returns the absolute minimum value among the two inputs. More...
 
template<typename T >
jet::absmax (T x, T y)
 Returns the absolute maximum value among the two inputs. More...
 
template<typename T >
jet::absminn (const T *x, size_t n)
 Returns absolute minimum among n-elements. More...
 
template<typename T >
jet::absmaxn (const T *x, size_t n)
 Returns absolute maximum among n-elements. More...
 
template<typename T >
size_t jet::argmin2 (T x, T y)
 
template<typename T >
size_t jet::argmax2 (T x, T y)
 
template<typename T >
size_t jet::argmin3 (T x, T y, T z)
 
template<typename T >
size_t jet::argmax3 (T x, T y, T z)
 
template<typename T >
jet::square (T x)
 Returns the square of x. More...
 
template<typename T >
jet::cubic (T x)
 Returns the cubic of x. More...
 
template<typename T >
jet::clamp (T val, T low, T high)
 Returns the clamped value. More...
 
template<typename T >
jet::degreesToRadians (T angleInDegrees)
 Converts degrees to radians. More...
 
template<typename T >
jet::radiansToDegrees (T angleInRadians)
 Converts radians to degrees. More...
 
template<class T >
void jet::getBarycentric (T x, ssize_t iLow, ssize_t iHigh, ssize_t *i, T *t)
 Gets the barycentric coordinate. More...
 
template<typename S , typename T >
jet::lerp (const S &f0, const S &f1, T t)
 Computes linear interpolation. More...
 
template<typename S , typename T >
jet::bilerp (const S &f00, const S &f10, const S &f01, const S &f11, T tx, T ty)
 Computes bilinear interpolation. More...
 
template<typename S , typename T >
jet::trilerp (const S &f000, const S &f100, const S &f010, const S &f110, const S &f001, const S &f101, const S &f011, const S &f111, T tx, T ty, T tz)
 Computes trilinear interpolation. More...
 
template<typename S , typename T >
jet::catmullRom (const S &f0, const S &f1, const S &f2, const S &f3, T t)
 Computes Catmull-Rom interpolation. More...
 
template<typename T >
jet::monotonicCatmullRom (const T &f0, const T &f1, const T &f2, const T &f3, T t)
 Computes monotonic Catmull-Rom interpolation. More...