Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

isEqualUint16Array

Test if two arguments are both Uint16Arrays and have equal values.

Usage

var isEqualUint16Array = require( '@stdlib/assert/is-equal-uint16array' );

isEqualUint16Array( v1, v2 )

Tests if two arguments are both Uint16Arrays and have equal values.

var Uint16Array = require( '@stdlib/array/uint16' );

var x = new Uint16Array( [ 1, 2 ] );
var y = new Uint16Array( [ 1, 2 ] );
var bool = isEqualUint16Array( x, y );
// returns true

bool = isEqualUint16Array( x, new Uint16Array( [ 1, 3 ] ) );
// returns false

Examples

var Uint16Array = require( '@stdlib/array/uint16' );
var isEqualUint16Array = require( '@stdlib/assert/is-equal-uint16array' );

var x = new Uint16Array( [ 1, 2, 3 ] );
var y = new Uint16Array( [ 1, 2, 3 ] );
var out = isEqualUint16Array( x, y );
// returns true

x = new Uint16Array( [ 0, 0, 0 ] );
y = [ 0, 0, 0 ];
out = isEqualUint16Array( x, y );
// returns false

x = new Uint16Array( [ 1, 2, 3 ] );
y = new Uint16Array( [ 1, 2, 4 ] );
out = isEqualUint16Array( x, y );
// returns false