Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isWithin

  • isWithin(num: number, min: number, max: number): boolean
  • Checks if the given number is within the given minimum and maximum.

    example

    isWithin(0, -2, 2); // true isWithin(1, -2, 2); // true isWithin(0, 1, 3); // false isWithin(1, 1, 2); // false

    Parameters

    • num: number

      The number to check.

    • min: number

      The minimum value exclusive.

    • max: number

      The maximum value exclusive.

    Returns boolean

    Whether the number is within the minimum and maximum.

Legend

  • Function

Generated using TypeDoc