mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-01 04:20:27 +02:00
fix wrong phi
This commit is contained in:
@@ -16,4 +16,4 @@ Converts from Cartesian to Spherical coordinates (used in mathematics). It retur
|
||||
r = round(coord[0]);
|
||||
theta = round(coord[1]);
|
||||
phi = round(coord[2]);
|
||||
assert([r, theta, phi] == [173, 45, 35]);
|
||||
assert([r, theta, phi] == [173, 45, 55]);
|
@@ -13,5 +13,5 @@ function spherical_coordinate(point) =
|
||||
[
|
||||
norm(point),
|
||||
atan2(point[1], point[0]),
|
||||
atan2(point[2], sqrt(point[0]^2 + point[1]^2))
|
||||
atan2(sqrt(point[0]^2 + point[1]^2), point[2])
|
||||
];
|
||||
|
Reference in New Issue
Block a user