Clamp


This object has been removed in release 10.0.0. Use NTL objects instead.

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

template<class TYPE> TYPE Clamp(const TYPE x, const TYPE min_val, const TYPE max_val);
    template<class TYPE> TVec2<TYPE> Clamp(const TVec2<TYPE> &x, const TYPE min_val, const TYPE max_val);
    template<class TYPE> TVec3<TYPE> Clamp(const TVec3<TYPE> &x, const TYPE min_val, const TYPE max_val);
    template<class TYPE> TVec4<TYPE> Clamp(const TVec4<TYPE> &x, const TYPE min_val, const TYPE max_val);
Namespace: nitisa::math
Include: Nitisa/Modules/Math/Utils.h (for scalar arguments)
Nitisa/Modules/Math/Vector.h (for vector arguments)