mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-18 04:21:16 +02:00
avoid floating error
This commit is contained in:
@@ -16,4 +16,8 @@ function shape_circle(radius, n) =
|
||||
step_a = 360 / _frags,
|
||||
end = (is_undef(n) || n > _frags) ? _frags - 1: n - 1
|
||||
)
|
||||
[for(a = [0:step_a:end * step_a]) [radius * cos(a), radius * sin(a)]];
|
||||
[
|
||||
for(i = [0:end])
|
||||
let(a = i * step_a)
|
||||
[radius * cos(a), radius * sin(a)]
|
||||
];
|
||||
|
@@ -14,7 +14,6 @@ function shape_ellipse(axes) =
|
||||
let(
|
||||
frags = __frags(axes[0]),
|
||||
step_a = 360 / frags,
|
||||
a_end = 360 - step_a,
|
||||
shape_pts = [
|
||||
for(i = [0:frags - 1])
|
||||
let(a = i * step_a)
|
||||
|
Reference in New Issue
Block a user