output array
real component
imaginary component
integer power of 10
real and imaginary components
var Float32Array = require( `@stdlib/array/float32` );
var out = new Float32Array( 2 );
var v = croundn( out, 5.555, -3.333, -2 );
// returns <Float32Array>[ 5.56, -3.34 ]
var bool = ( v === out );
// returns true
Rounds a complex number to the nearest multiple of 10^n
.
2
, rounding to specified digits can be inexact.real component
imaginary component
integer power of 10
real and imaginary components
var out = croundn( 5.555, -3.333, -2 );
// returns [ 5.56, -3.34 ]
Rounds a complex number to the nearest multiple of
10^n
.Notes
2
, rounding to specified digits can be inexact.