clampToStartEnd MethodStatic

Clamp to (min(a,b), max(a,b)).

  • Always returns a number between a and b.

clampToStartEnd(value: number, a: number, b: number): number

Parameter Type Description
value number value to clamp
a number smallest allowed output if a < b or largest allowed output if a > b
b number largest allowed output if a < b or smallest allowed output if a > b

Returns - number

Defined in

Last Updated: 14 November, 2024