Ensures a given value is within a given boundary.

  • Parameters

    • input: number

      The number to clamp.

    • floor: number

      The lower bound.

    • ceil: number

      The upper bound.

    Returns number

    The number clamped to the desired range.