Phaser API Documentation

  Version: 

Member of: Phaser.Math.Fuzzy

<static> Equal(a, b, [epsilon])

Description:

Check whether the given values are fuzzily equal.

Two numbers are fuzzily equal if their difference is less than epsilon.

Parameters:

name type arguments Default description
a number

The first value.

b number

The second value.

epsilon number <optional> 0.0001

The epsilon.

Returns:
Description:

true if the values are fuzzily equal, otherwise false.

Type:
  • boolean
Examples:
Since: 3.0.0
Source: src/math/fuzzy/Equal.js (Line 7)