Options
All
  • Public
  • Public/Protected
  • All
Menu

Index

Functions

Functions

Const isBetween

  • isBetween(num: number, min: number, max: number): boolean
  • Checks if the given number is between the given minimum and maximum (inclusive).

    example

    isBetween(0, -2, 2); // true isBetween(1, -2, 2); // true isBetween(1, 1, 2); // true isBetween(0, 1, 3); // false isBetween(10, 30, 50); // 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 between the minimum and maximum (inclusive).

Legend

  • Function

Generated using TypeDoc