1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 14:18:13 +01:00
dotSCAD/docs/lib3x-polar_coordinate.md

18 lines
360 B
Markdown
Raw Normal View History

2021-02-13 10:56:11 +08:00
# polar_coordinate
2021-02-13 10:57:16 +08:00
Converts from Cartesian to Polar coordinates. It returns `[radius, theta]`.
2021-02-13 10:56:11 +08:00
**Since:** 3.0
## Parameters
2021-02-13 10:57:58 +08:00
- `point` : The Cartesian coordinates of a point.
2021-02-13 10:56:11 +08:00
## Examples
use <util/polar_coordinate.scad>;
coord = polar_coordinate([100, 100]);
r = round(coord[0]);
theta = round(coord[1]);
assert([r, theta] == [141, 45]);