1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-02 19:22:48 +02:00

add polar_coordinate

This commit is contained in:
Justin Lin
2021-02-13 10:56:11 +08:00
parent ac7711a827
commit 9aebfe8e11
3 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
# polar_coordinate
Converts from Cartesian to Polar coordinates.
**Since:** 3.0
## Parameters
- `point` : The Cartesian coordinates (also called rectangular coordinates) of a point.
## Examples
use <util/polar_coordinate.scad>;
coord = polar_coordinate([100, 100]);
r = round(coord[0]);
theta = round(coord[1]);
assert([r, theta] == [141, 45]);