Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> MaxAdd(value, amount, max)

Description:

Add an amount to a value, limiting the maximum result to max.

Parameters:

name type description
value number

The value to add to.

amount number

The amount to add.

max number

The maximum value to return.

Returns:
Description:

The resulting value.

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