mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-10 08:44:20 +02:00
return [0, 0] if [0, 0]
This commit is contained in:
@@ -8,4 +8,4 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
function polar_coordinate(point) = [norm(point), atan2(point.y, point.x)]; // r, theta
|
function polar_coordinate(point) = point == [0, 0] ? point : [norm(point), atan2(point.y, point.x)]; // r, theta
|
Reference in New Issue
Block a user