Phaser API Documentation

  Version: 

Member of: Phaser.Math.Angle

<static> BetweenPoints(point1, point2)

Description:

Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y).

Calculates the angle of the vector from the first point to the second point.

Parameters:

name type description
point1 Phaser.Types.Math.Vector2Like

The first point.

point2 Phaser.Types.Math.Vector2Like

The second point.

Returns:
Description:

The angle in radians.

Type:
  • number
Since: 3.0.0