Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

distanceSq(src)

Description:

Calculate the distance between this Vector and the given Vector, squared.

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, squared.

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