直角坐标与极坐标相互转换
直角坐标转极坐标:
r = √(x² + y²)
θ = arctan(y/x) [角度制]
极坐标转直角坐标:
x = r × cos(θ)
y = r × sin(θ)
注意:角度 θ 以度为单位,计算时需转换为弧度