roundIn()

Rounds a number towards 0.

This function is valid in v2.0.0 to v2.12.0. This function has been downloaded 14 times.

Parameters

{number} num
Number to round towards 0.
{number=} opt_precision Optional
The precision (as an integer) with which to round the number towards 0.

Returns

{number}
num rounded towards 0.

Required Functions

This function requires the following functions which are included automatically:

  • ceil()
    Rounds towards Infinity with the specified precision.
  • floor()
    Rounds towards -Infinity with the specified precision.
  • roundOut()
    Rounds a number towards 0.