Skip to content

Function clamp

function clamp(const T1 &, const T2 &, const T3 &) simd

template <numeric T1, numeric T2, numeric T3, typename Tout = std::common_type_t<T1, T2, T3>>
KFR_INTRINSIC Tout clamp(const T1& x, const T2& lo, const T3& hi)

Returns the first argument clamped to a range [lo, hi]

Remark

Supports integer and floating-point numbers, scalars, and vec<>.

Fully qualified name: kfr::clamp(const T1 &, const T2 &, const T3 &)

Declared at simd/clamp.hpp:37

Function clamp

function clamp(const T1 &, const T2 &) simd

template <numeric T1, numeric T2, typename Tout = std::common_type_t<T1, T2>>
KFR_INTRINSIC Tout clamp(const T1& x, const T2& hi)

Returns the first argument clamped to a range [0, hi]

Remark

Supports integer and floating-point numbers, scalars, and vec<>.

Fully qualified name: kfr::clamp(const T1 &, const T2 &)

Declared at simd/clamp.hpp:47

This file was generated by cxxdox, a C++ documentation generator based on MkDocs Material and libclang.