Step


Calculate step function. Return 0 if x is less than edge. Return 1 otherwise. For vectors the rule is applied for each element.

template<class TYPE>
constexpr TYPE Step(const TYPE x, const TYPE edge); // Calculate step function.
template<class TYPE>
TVec1<TYPE> Step(const TVec1<TYPE> &v, const TVec1<TYPE> &edge);
template<class TYPE>
TVec2<TYPE> Step(const TVec2<TYPE> &v, const TVec2<TYPE> &edge);
template<class TYPE>
TVec3<TYPE> Step(const TVec3<TYPE> &v, const TVec3<TYPE> &edge);
template<class TYPE>
TVec4<TYPE> Step(const TVec4<TYPE> &v, const TVec4<TYPE> &edge);
Namespace: ntl
Include: NTL/Core/Utils.h (For non-vector arguments)
NTL/Core/Vec1.h (For TVec1 arguments)
NTL/Core/Vec2.h (For TVec2 arguments)
NTL/Core/Vec3.h (For TVec3 arguments)
NTL/Core/Vec4.h (For TVec4 arguments)