Phaser API Documentation

  Version: 

Member of: Phaser.Geom.Line

<static> GetShortestDistance(line, point)

Description:

Get the shortest distance from a Line to the given Point.

Parameters:

name type description
line Phaser.Geom.Line

The line to get the distance from.

point object | Phaser.Geom.Point

The point to get the shortest distance to.

Returns:
Description:

The shortest distance from the line to the point.

Type:
  • number
Since: 3.16.0