Mathter
A configurable 3D math library for game developers.
Classes | Namespaces | Functions
Utility.hpp File Reference
#include <type_traits>
#include <algorithm>
#include "Vector.hpp"

Go to the source code of this file.

Classes

class  mathter::Vector< T, Dim, Packed >
 Represents a vector in N-dimensional space. More...
 
class  mathter::Constants< Scalar >
 Accurate mathematical constants. More...
 

Namespaces

 mathter
 

Functions

template<class Scalar >
auto mathter::Rad2Deg (Scalar rad)
 Converts radians to degrees. More...
 
template<class Scalar >
auto mathter::Deg2Rad (Scalar deg)
 Converts degrees to radians. More...
 
template<class Scalar >
Scalar mathter::Clamp (Scalar arg, Scalar lower, Scalar upper)
 Limits arg to the range [lower, upper], making it either lower or upper if out of range. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::Clamp (const Vector< T, Dim, Packed > &arg, T lower, T upper)
 Clamps all elements of the vector according to the scalar clamp. More...
 
template<class Scalar >
Scalar mathter::Saturate (Scalar arg)
 Clamps argument into range [0,1]. More...
 
template<class T , int Dim, bool Packed>
Vector< T, Dim, Packed > mathter::Saturate (const Vector< T, Dim, Packed > &arg)
 Clamps all elements into range [0,1]. More...