Math#floorTo()

floorTo(value, place, base) → {number}

Floors to some place comparative to a base, default is 10 for decimal place.
The place is represented by the power applied to base to get that place.

Parameters
Name Type Argument Default Description
value number

The value to round.

place number <optional>
0

The place to round to.

base number <optional>
10

The base to round in. Default is 10 for decimal.

Returns
number -

The rounded value.

Source code: math/Math.js (Line 281)
doc_phaser
2017-02-14 10:54:51
Comments
Leave a Comment

Please login to continue.