Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

fuzzyEquals(v, [epsilon])

Description:

Check whether this Vector is approximately equal to a given Vector.

Parameters:

name type arguments Default description
v Phaser.Types.Math.Vector2Like

The vector to compare with this Vector.

epsilon number <optional> 0.0001

The tolerance value.

Returns:
Description:

Whether both absolute differences of the x and y components are smaller than epsilon.

Type:
  • boolean
Since: 3.23.0
Source: src/math/Vector2.js (Line 191)