Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/assert/is-integer/docs/types/index.d"

Index

Functions

Functions

isInteger

  • isInteger(x: number): boolean
  • Tests if a finite double-precision floating-point number is an integer.

    Notes

    • The function assumes a finite number. If provided positive or negative infinity, the function will return true, when, in fact, the result is undefined.

    Parameters

    • x: number

      value to test

    Returns boolean

    boolean indicating whether the value is an integer

    Example

    var bool = isInteger( 1.0 );
    // returns true

    Example

    var bool = isInteger( 3.14 );
    // returns false