Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Index

Functions

Functions

Export assignment isComplexLike

  • isComplexLike(value: any): value is ComplexLike
  • Tests if a value is a complex number-like object.

    Parameters

    • value: any

      value to test

    Returns value is ComplexLike

    boolean indicating if a value is a complex number-like object.

    Example

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