Phaser API Documentation

  Version: 

Member of: Phaser.Math.Angle

<static> CounterClockwise(angle)

Description:

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.

Parameters:

name type description
angle number

The angle to convert, in radians.

Returns:
Description:

The converted angle, in radians.

Type:
  • number
Since: 3.16.0