Converts a cartesian coordinate given with x
and y
to a polar coordinate (radius and angle).
Returns:
An object { radius: resultRadius, angle: resultAngle }
.
The result in polarCoordinate
will be { radius: 50, angle: 0.6435011087932844 }
.
let polarCoordinate = gmynd.polar(40, 30);