@stdlib/assert
Version:
Standard assertion utilities.
36 lines (26 loc) • 901 B
Plain Text
{{alias}}( v1, v2 )
Tests if two arguments are both Complex128Arrays and have the same values.
The function differs from the `===` operator in that the function treats
`-0` and `+0` as distinct and `NaNs` as the same.
Parameters
----------
v1: any
First input value.
v2: any
Second input value.
Returns
-------
bool: boolean
Boolean indicating whether two arguments are the same.
Examples
--------
> var x = new {{alias: /array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var y = new {{alias: /array/complex128}}( [ 1.0, 2.0, 3.0, 4.0 ] );
> var bool = {{alias}}( x, y )
true
> x = new {{alias: /array/complex128}}( [ NaN, NaN, NaN, NaN ] );
> y = new {{alias: /array/complex128}}( [ NaN, NaN, NaN, NaN ] );
> bool = {{alias}}( x, y )
true
See Also
--------