roundIn()

Rounds a number towards 0.

This function is valid in v2.0.0 to v2.24.3. This function has been downloaded 60 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 directly 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.

Requiring Function

This function is directly required by the following function: