nw::ut::Clamp Function

Syntax

template <typename T>
T Clamp(
     T x,
     T low,
     T high
);

Arguments

Name Description
in x Values to be compared
in low Minimum value
in high Maximum value

Return Values

Returns low if x < low, high if x > high, and x in all other cases.

Description

Returns a value between low and high.


CONFIDENTIAL