Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

  • clamp(value: number, min: number, max: number): number
  • Clamps the given value between min and max.

    Parameters

    • value: number

      The value to clamp.

    • min: number

      The min possible value.

    • max: number

      The max possible value.

    Returns number

    value or a value clamped to min or max.

  • lerp(a: number, b: number, t: number): number
  • Linear interpolates a value between a and b by t. If t is 0, then the result will be a. If t is 1, then the result will be b. t will be clamped to a value between 0 and 1.

    Parameters

    • a: number

      The start value.

    • b: number

      The end value.

    • t: number

      The interpolation value between 0 and 1.

    Returns number

    The interpolated value between a and b.