Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "math/base/special/min/docs/types/index.d"

Index

Functions

Functions

min

  • min(x?: undefined | number, y?: undefined | number, ...args: Array<number>): number
  • Returns the minimum value.

    Notes

    • When an empty set is considered a subset of the extended reals (all real numbers, including positive and negative infinity), positive infinity is the greatest lower bound. Similar to zero being the identity element for the sum of an empty set and to one being the identity element for the product of an empty set, positive infinity is the identity element for the minimum, and thus, if not provided any arguments, the function returns positive infinity.

    Parameters

    • Optional x: undefined | number

      first number

    • Optional y: undefined | number

      second number

    • Rest ...args: Array<number>

      numbers

    Returns number

    minimum value

    Example

    var v = min( 3.14, 4.2 );
    // returns 3.14

    Example

    var v = min( 5.9, 3.14, 4.2 );
    // returns 3.14

    Example

    var v = min( 3.14, NaN );
    // returns NaN

    Example

    var v = min( +0.0, -0.0 );
    // returns -0.0