Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-complex/docs/types/index.d"

Index

Functions

Functions

Export assignment isComplex

  • isComplex(value: any): boolean
  • Tests if a value is a 64-bit or 128-bit complex number.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating if a value is a 64-bit or 128-bit complex number

    Example

    var Complex128 = require( `@stdlib/complex/float64` );
    var Complex64 = require( `@stdlib/complex/float32` );
    
    var x = new Complex128( 4.0, 2.0 );
    var bool = isComplex( x );
    // returns true
    
    x = new Complex64( 4.0, 2.0 );
    bool = isComplex( x );
    // returns true