Phaser API Documentation

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

Methods

<static> Ceil(value, [epsilon])
Focus
Focus

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.

Returns:
Description:

The fuzzy ceiling of the value.

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

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
Since: 3.0.0
Source: src/math/fuzzy/Equal.js (Line 7)
Focus
Focus
<static> Floor(value, [epsilon])
Focus
Focus

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.

Returns:
Description:

The floor of the value.

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

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.

Returns:
Description:

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

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

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.

Returns:
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)
Focus
Focus