CLAMP
- Macro
- October 8, 2025
Table of Contents
CLAMP
CLAMPDescription
Clamps the value of x to be within the inclusive range [lo, hi].
Parameters
| Name | Direction | Description |
|---|---|---|
x | in | The value to be clamped. |
lo | in | The lower bound of the clamping range. |
hi | in | The upper bound of the clamping range. |
Success
Returns lo if x < lo, hi if x > hi, otherwise x.
Failure
Function cannot fail - always returns a clamped value.
Usage example (Cross-references)
No external code usages found in the scanned files.