Takes an angle in Phasers default clockwise format and converts it so that 0 is North, 90 is West, 180 is South and 270 is East, therefore running counter-clockwise instead of clockwise.
You can pass in the angle from a Game Object using:
var converted = CounterClockwise(gameobject.rotation);
All values for this function are in radians.
name | type | description |
---|---|---|
angle | number |
The angle to convert, in radians. |
The converted angle, in radians.