Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment flipsign

  • flipsign(x: number, y: number): number
  • Returns a double-precision floating-point number with the magnitude of x and the sign of x*y.

    Parameters

    • x: number

      number from which to derive a magnitude

    • y: number

      number from which to derive a sign

    Returns number

    a double-precision floating-point number

    Example

    var z = flipsign( -3.0, 10.0 );
    // returns -3.0

    Example

    var z = flipsign( -3.0, -1.0 );
    // returns 3.0

    Example

    var z = flipsign( 1.0, -0.0 );
    // returns -1.0

    Example

    var z = flipsign( -3.0, -0.0 );
    // returns 3.0

    Example

    var z = flipsign( -0.0, 1.0 );
    // returns -0.0

    Example

    var z = flipsign( 0.0, -1.0 );
    // returns -0.0