1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-10 00:36:40 +02:00

avoid floating error

This commit is contained in:
Justin Lin
2022-04-18 10:33:59 +08:00
parent 5e1f247679
commit 31fa1869c2

View File

@@ -16,7 +16,8 @@ function shape_ellipse(axes) =
step_a = 360 / frags,
a_end = 360 - step_a,
shape_pts = [
for(a = 0; a <= a_end; a = a + step_a)
for(i = [0:frags - 1])
let(a = i * step_a)
[axes[0] * cos(a), axes[1] * sin(a)]
]
) shape_pts;