template <typename T>
T Clamp(
T x,
T low,
T high
);
| Name | Description |
|---|---|
| T | Type representing a numeric value |
| Name | Description | |
|---|---|---|
| in | x | Target value |
| in | low | Lower threshold |
| in | high | Higher threshold |
Fits a value within the specified range.
If x is not within low and high, then either low or high is returned (whichever is closest to the value).
CONFIDENTIAL