Phaser API Documentation

Version:
Namespace: Fuzzy
Phaser.Math.Fuzzy
Source: src/math/fuzzy/index.js (Line 7)

Methods

<static> Ceil(value, [epsilon])

Description:

Calculate the fuzzy ceiling of the given value.

Parameters:

name type arguments Default description
value number

The value.

epsilon number <optional> 0.0001

The epsilon.

Description:

The fuzzy ceiling of the value.

Type:
• number
Since: 3.0.0
Source: src/math/fuzzy/Ceil.js (Line 7)
<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.

Description:

`true` if the values are fuzzily equal, otherwise `false`.

Type:
• boolean
Since: 3.0.0
Source: src/math/fuzzy/Equal.js (Line 7)
<static> Floor(value, [epsilon])

Description:

Calculate the fuzzy floor of the given value.

Parameters:

name type arguments Default description
value number

The value.

epsilon number <optional> 0.0001

The epsilon.

Description:

The floor of the value.

Type:
• number
Since: 3.0.0
Source: src/math/fuzzy/Floor.js (Line 7)
<static> GreaterThan(a, b, [epsilon])

Description:

Check whether `a` is fuzzily greater than `b`.

`a` is fuzzily greater than `b` if it is more than `b - epsilon`.

Parameters:

name type arguments Default description
a number

The first value.

b number

The second value.

epsilon number <optional> 0.0001

The epsilon.

Description:

`true` if `a` is fuzzily greater than than `b`, otherwise `false`.

Type:
• boolean
Since: 3.0.0
<static> LessThan(a, b, [epsilon])

Description:

Check whether `a` is fuzzily less than `b`.

`a` is fuzzily less than `b` if it is less than `b + epsilon`.

Parameters:

name type arguments Default description
a number

The first value.

b number

The second value.

epsilon number <optional> 0.0001

The epsilon.

Description:

`true` if `a` is fuzzily less than `b`, otherwise `false`.

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