Phaser API Documentation

  Version: 

Member of: Phaser.Math

<static> Difference(a, b)

Description:

Calculates the positive difference of two given numbers.

Parameters:

name type description
a number

The first number in the calculation.

b number

The second number in the calculation.

Returns:
Description:

The positive difference of the two given numbers.

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