Clamp


This function has been removed in release 10.0.0. Use ntl::Clamp function instead.

Return value limited to the specified min and max values. This function is an C++ analogue of GLSL clamp function.

constexpr int Clamp(const int x, const int min_val, const int max_val);
constexpr long long Clamp(const long long x, const long long min_val, const long long max_val);
constexpr float Clamp(const float x, const float min_val, const float max_val);
constexpr double Clamp(const double x, const double min_val, const double max_val);
Vector Clamp(const Vector &x, const float min_val, const float max_val);
Namespace: nitisa
Include: Nitisa/Core/Math/Utils.h (For float and integer arguments)
Nitisa/Core/Math/VectorUtils.h (For Vector arguments)