diff --git a/src/__comm__/__edge_r.scad b/src/__comm__/__edge_r.scad index 70a6888d..64ace0dc 100644 --- a/src/__comm__/__edge_r.scad +++ b/src/__comm__/__edge_r.scad @@ -1,7 +1,5 @@ function __edge_r_begin(orig_r, a, a_step, m) = - let(leng = orig_r * cos(a_step / 2)) - leng / cos((m - 0.5) * a_step - a); + (orig_r * cos(a_step / 2)) / cos((m - 0.5) * a_step - a); function __edge_r_end(orig_r, a, a_step, n) = - let(leng = orig_r * cos(a_step / 2)) - leng / cos((n + 0.5) * a_step - a); \ No newline at end of file + (orig_r * cos(a_step / 2)) / cos((n + 0.5) * a_step - a); \ No newline at end of file diff --git a/src/__comm__/__fast_fibonacci.scad b/src/__comm__/__fast_fibonacci.scad index 61ec0071..c082565d 100644 --- a/src/__comm__/__fast_fibonacci.scad +++ b/src/__comm__/__fast_fibonacci.scad @@ -4,7 +4,7 @@ function __fast_fibonacci_sub(nth) = a = _f[0], b = _f[1], c = a * (b * 2 - a), - d = a * a + b * b + d = a ^ 2 + b ^ 2 ) nth % 2 == 0 ? [c, d] : [d, c + d]; diff --git a/src/__comm__/__in_line.scad b/src/__comm__/__in_line.scad index 6d7e7666..db4ebf07 100644 --- a/src/__comm__/__in_line.scad +++ b/src/__comm__/__in_line.scad @@ -1,7 +1,7 @@ function __in_line(line_pts, pt, epsilon = 0.0001) = let( - pts = len(line_pts[0]) == 2 ? [for(p = line_pts) [p[0], p[1], 0]] : line_pts, - pt3d = len(pt) == 2 ? [pt[0], pt[1], 0] : pt, + pts = len(line_pts[0]) == 2 ? [for(p = line_pts) [each p, 0]] : line_pts, + pt3d = len(pt) == 2 ? [each pt, 0] : pt, v1 = pts[0] - pt3d, v2 = pts[1] - pt3d ) diff --git a/src/_impl/_bezier_curve_impl.scad b/src/_impl/_bezier_curve_impl.scad index 25c2ed3c..1fd49ae6 100644 --- a/src/_impl/_bezier_curve_impl.scad +++ b/src/_impl/_bezier_curve_impl.scad @@ -7,9 +7,8 @@ function _combi(n, k) = [1,3,3,1] // n = 3: for Cubic Bézier curves ] ) - n < 4 ? bi_coef[n][k] : ( - k == 0 ? 1 : (_combi(n, k - 1) * (n - k + 1) / k) - ); + n < 4 ? bi_coef[n][k] : + k == 0 ? 1 : (_combi(n, k - 1) * (n - k + 1) / k); function bezier_curve_coordinate(t, pn, n, i = 0) = i == n + 1 ? 0 : diff --git a/src/_impl/_bijection_offset_impl.scad b/src/_impl/_bijection_offset_impl.scad index 3dde70c6..608012fb 100644 --- a/src/_impl/_bijection_offset_impl.scad +++ b/src/_impl/_bijection_offset_impl.scad @@ -24,12 +24,8 @@ function _bijection_offset_edge(edge, dx, dy) = function _bijection__bijection_offset_edges(edges, d) = [ for(edge = edges) - let( - ow_normal = _bijection_outward_edge_normal(edge), - dx = ow_normal.x * d, - dy = ow_normal.y * d - ) - _bijection_offset_edge(edge, dx, dy) + let(ow_normal_d = _bijection_outward_edge_normal(edge) * d) + _bijection_offset_edge(edge, ow_normal_d.x, ow_normal_d.y) ]; function _bijection_offset_impl(pts, d, epsilon) = diff --git a/src/_impl/_golden_spiral_impl.scad b/src/_impl/_golden_spiral_impl.scad index 309482e9..dd033fff 100644 --- a/src/_impl/_golden_spiral_impl.scad +++ b/src/_impl/_golden_spiral_impl.scad @@ -8,7 +8,7 @@ function _fast_fibonacci_sub(nth) = a = _f[0], b = _f[1], c = a * (b * 2 - a), - d = a * a + b * b + d = a ^ 2 + b ^ 2 ) nth % 2 == 0 ? [c, d] : [d, c + d];