Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

distance(src)

Description:

Calculate the distance between this Vector and the given Vector.

Parameters:

name type description
src Phaser.Math.Vector2

The Vector to calculate the distance to.

Returns:
Description:

The distance from this Vector to the given Vector.

Type:
  • number
Since: 3.0.0
Source: src/math/Vector2.js (Line 362)