34 #ifdef __cpp_lib_clamp
52 template<
typename dtype>
53 dtype
clip(dtype inValue, dtype inMinValue, dtype inMaxValue)
57 #ifdef __cpp_lib_clamp
58 const auto comparitor = [](dtype lhs, dtype rhs) noexcept ->
bool
63 return std::clamp(inValue, inMinValue, inMaxValue, comparitor);
65 if (inValue < inMinValue)
69 else if (inValue > inMaxValue)
90 template<
typename dtype>
93 return inArray.
clip(inMinValue, inMaxValue);