Skip to content

Math

Helper functions that have to do with math.

function clamp(num, min, max): number;

Defined in: functions/math.ts:13

Helper function to normalize a number, ensuring that it is within a certain range.

  • If num is less than min, then it will be clamped to min.
  • If num is greater than max, then it will be clamped to max.
Parameter Type
num number
min number
max number

number