Phaser API Documentation


Member of: Phaser.Math

<static> RotateAround(point, x, y, angle)


Rotate a point around x and y to the given angle, at the same distance.

In polar notation, this maps a point from (r, t) to (r, 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.


The given point.

Since: 3.0.0
Source: src/math/RotateAround.js (Line 7)