Rounds a number towards 0.

This function is valid in v2.0.0 to v2.24.2. This function has been downloaded 40 times.


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


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: