Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment minabs

  • minabs(x?: undefined | number, y?: undefined | number, ...args: Array<number>): number
  • Returns the minimum absolute 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 upper 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 absolute value

    Example

    var v = minabs( -3.14, 4.2 );
    // returns 3.14

    Example

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

    Example

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

    Example

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