How rectangular to polar coordinates conversion works
For a point (x, y), the polar radius is r = √(x² + y²) and the angle is θ = atan2(y, x). Using atan2 ensures the correct quadrant and handles x = 0 safely.
- Degrees ↔ Radians:
deg = rad × (180/π),rad = deg × (π/180) - Polar → Rectangular:
x = r·cos(θ),y = r·sin(θ) - We normalize θ to [0, 360) for clarity.
