print( math.Clamp( 10, 0, 5 ) ) -- 10 is greater than 5 so returns 5print( math.Clamp( 3, 0, 5 ) ) -- 3 is greater than 0 and less than 5, so returns 3print( math.Clamp( -1, 0, 5 ) ) -- -1 is less than 0, so returns 0
Output:
530
Example
Heals player by 10%, but won't let their health go above 100.