|
| float | donner::NarrowToFloat (double from) |
| | Semantically represent a narrowing conversion, such as converting a double to a float, to make the conversion more visible.
|
|
template<typename T> |
| const T & | donner::Min (const T &a, const T &b) |
| | Returns minimum of the provided values.
|
|
template<typename T, typename... Args> |
| const T & | donner::Min (const T &a, const T &b, Args &&... args) |
| | Returns minimum of the provided values.
|
|
template<typename T> |
| const T & | donner::Max (const T &a, const T &b) |
| | Returns maximum of the provided values.
|
|
template<typename T, typename... Args> |
| const T & | donner::Max (const T &a, const T &b, Args &&... args) |
| | Returns maximum of the provided values.
|
|
float | donner::Abs (float a) |
| | Returns the absolute value of the number.
|
|
double | donner::Abs (double a) |
| | Returns the absolute value of the number.
|
|
template<typename T, typename = std::enable_if<std::is_integral<T>::value && std::is_signed<T>::value>> |
| T | donner::Abs (T a) |
| | Returns the absolute value of the number.
|
|
template<typename T, typename = std::enable_if<std::is_floating_point<T>::value>> |
| T | donner::Round (T orig) |
| | Round a floating point value to an integer.
|
| template<typename T> |
| T | donner::Lerp (T a, T b, const float t) |
| | Returns linear interpolation of a and b with ratio t.
|
|
template<typename T> |
| const T | donner::Clamp (T value, T low, T high) |
| | Clamps a value between low and high.
|
|
template<typename T> |
| bool | donner::NearEquals (T a, T b, T tolerance=std::numeric_limits< T >::epsilon()) |
| | Returns if a equals b, taking possible rounding errors into account.
|
|
template<typename T> |
| bool | donner::NearZero (T a, T tolerance=std::numeric_limits< T >::epsilon()) |
| | Returns if a equals zero, taking rounding errors into account.
|
| template<typename T, typename = std::enable_if<std::is_integral<T>::value>> |
| bool | donner::InRange (T var, T start, T end) |
| | Test if a variable is in a specific range, using an optimized technique that requires only one branch.
|
| template<typename T> |
| QuadraticSolution< T > | donner::SolveQuadratic (T a, T b, T c) |
| | Solve a quadratic equation.
|