floor()

Rounds towards -Infinity with the specified precision.

This function is valid in v2.0.0 to v2.14.0. This function has been downloaded 47 times.

Parameters

{number} num
The number to be rounded towards Infinity.
{number=} opt_precision Optional
The precision (as an integer) with which to round the number towards -Infinity. Using the precision is similar to doing Math.floor(num * Math.pow(10, precision)) / Math.pow(10, precision).

Returns

{number}
Returns num rounded towards -Infinity with the specified precision.

Required Function

This function requires the following function which is included automatically:

  • round()
    Rounds with the specified precision.