Rounds a numeric value to the nearest power of 10 toward zero.
10
input value
rounded value
var v = trunc10( 3.141592653589793 ); // returns 1.0
var v = trunc10( 13.0 ); // returns 10.0
var v = trunc10( -0.314 ); // returns -0.1
Rounds a numeric value to the nearest power of
10
toward zero.Notes