Phaser API Documentation


Member of: Phaser.Math

<static> RotateAroundDistance(point, x, y, angle, distance)


Rotate a point around x and y by the given angle and distance.

In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y).


name type description
point object | Phaser.Geom.Point

The point to be rotated.

x number

The horizontal coordinate to rotate around.

y number

The vertical coordinate to rotate around.

angle number

The angle of rotation in radians.

distance number

The distance from (x, y) to place the point at.


The given point.

Since: 3.0.0