Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment copysignf

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

    Parameters

    • x: number

      number from which to derive a magnitude

    • y: number

      number from which to derive a sign

    Returns number

    a single-precision floating-point number

    Example

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

    Example

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

    Example

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

    Example

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

    Example

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