Phaser API Documentation

  Version: 
<static> BetweenPoints(a, b)

Description:

Calculate the distance between two points.

Parameters:

name type description
a Phaser.Types.Math.Vector2Like

The first point.

b Phaser.Types.Math.Vector2Like

The second point.

Returns:
Description:

The distance between the points.

Type:
  • number
Examples:
Since: 3.22.0