Click or drag to resize

MathfCartesian2Polar Method

Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle).

Namespace:  Godot
Assembly:  GodotSharp (in GodotSharp.dll) Version: 1.0.0
Syntax
C#
public static Vector2 Cartesian2Polar(
	float x,
	float y
)

Parameters

x
Type: SystemSingle
The input X coordinate.
y
Type: SystemSingle
The input Y coordinate.

Return Value

Type: Vector2
A Vector2 with X representing the distance and Y representing the angle.
See Also