Kanzi  3.9.7
Kanzi Engine API
math_utils.hpp File Reference

Namespaces

 kanzi
 Easing functions that require external dependencies for calculation.
 

Functions

template<typename T >
kanzi::componentWiseClamp (const T &value, const T &minvalue, const T &maxvalue)
 Clamps all vector fields between the given minimum and the maximum values. More...
 
constexpr float kanzi::degreesToRadians (float angleInDegrees)
 Converts degrees to radians. More...
 
bool kanzi::floatIsAlmostEqual (float valueA, float valueB)
 Check if two floats are approximately equal. More...
 
bool kanzi::floatIsAlmostEqualAbsolute (float valueA, float valueB, float maxAbsoluteDifference)
 Check if two floats are equal up to a given difference. More...
 
bool kanzi::floatIsAlmostEqualUlps (float valueA, float valueB, unsigned int maxUlps)
 Floating point helper methods. More...
 
constexpr bool kanzi::floatIsEqual (float valueA, float valueB)
 Check if two floats are equal. More...
 
constexpr unsigned int kanzi::floatToUint (float value)
 Casts a float to unsigned int. More...
 
constexpr float kanzi::getCloseToZeroRange ()
 Returns the largest value of a floating point number which is considered as "almost zero". More...
 
tuple< float, float, float > kanzi::hslTosRGBColor (float h, float s, float l)
 Converts a color from the HSL color space to the sRGB color space. More...
 
bool kanzi::isCloseToZero (float value)
 Checks if floating point value is too close to zero. More...
 
template<class T >
bool kanzi::isInClosedInterval (T value, T min, T max)
 Check whether value is in [min, max] (an interval inclusive of the limit points). More...
 
float kanzi::linearTosRGB (float cl)
 Conversion from linear to sRGB for default gamma 2.2. More...
 
unsigned int kanzi::positiveModulo (int dividend, unsigned int divisor)
 Returns the positive modulo(dividend % divisor) for signed numbers in a way that negative numbers are treated as an extension instead of mirroring compared to positive numbers. More...
 
float kanzi::positiveModulo (float dividend, float divisor)
 Same as positiveModulo(), but for floating point numbers. More...
 
constexpr float kanzi::radiansToDegrees (float angleInRadians)
 Converts radians to degrees. More...
 
tuple< float, float, float > kanzi::sRGBToHSLColor (float r, float g, float b)
 Converts a color from the sRGB color space to the HSL color space. More...
 
float kanzi::sRGBToLinear (float cs)
 Conversion from sRGB to linear for default gamma 2.2. More...
 
constexpr int kanzi::step (int edge, int value)
 Calculate step for integers. More...
 
constexpr float kanzi::step (float edge, float value)
 Calculate step for floating point values. More...