Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> FloorTo(value, [place], [base])

Description:

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 arguments 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:
Description:

The rounded value.

Type:
  • number
Since: 3.0.0
Source: src/math/FloorTo.js (Line 7)