Phaser API Documentation

  Version: 

Member of: Phaser.Math.Vector2

setToPolar(azimuth, [radius])

Description:

Sets the x and y values of this object from a given polar coordinate.

Parameters:

name type arguments Default description
azimuth number

The angular coordinate, in radians.

radius number <optional> 1

The radial coordinate (length).

Returns:
Description:

This Vector2.

Since: 3.0.0
Source: src/math/Vector2.js (Line 153)