Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment modf

  • Decomposes a double-precision floating-point number into integral and fractional parts, each having the same type and sign as the input value.

    Parameters

    • out: Collection

      output array

    • x: number

      input value

    Returns Collection

    output array

    Example

    var Float64Array = require( `@stdlib/array/float64` );
    
    var out = new Float64Array( 2 );
    
    var parts = modf( out, 3.14 );
    // returns <Float64Array>[ 3.0, 0.14000000000000012 ]
    
    var bool = ( parts === out );
    // returns true
  • Decomposes a double-precision floating-point number into integral and fractional parts, each having the same type and sign as the input value.

    Parameters

    • x: number

      input value

    Returns Collection

    output array

    Example

    var parts = modf( 3.14 );
    // returns [ 3.0, 0.14000000000000012 ]