Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> RoundAwayFromZero(value)

Description:

Round a given number so it is further away from zero. That is, positive numbers are rounded up, and negative numbers are rounded down.

Parameters:

name type description
value number

The number to round.

Returns:
Description:

The rounded number, rounded away from zero.

Type:
  • number
Examples:
Since: 3.0.0