output array
real component
imaginary component
real and imaginary components
var Float32Array = require( `@stdlib/array/float32` );
var out = new Float32Array( 2 );
var v = cround( out, -4.2, 5.5 );
// returns <Float32Array>[ -4.0, 6.0 ]
var bool = ( v === out );
// returns true
Rounds a complex number to the nearest integer.
real component
imaginary component
real and imaginary components
var out = cround( 5.5, 3.3 );
// returns [ 6.0, 3.0 ]
Rounds a complex number to the nearest integer.