From ce4b59e70fcc405eb981b6f5184082221c3464e0 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 7 May 2017 17:46:15 +0800 Subject: [PATCH] formatted code --- src/circular_sector.scad | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/circular_sector.scad b/src/circular_sector.scad index e438c605..bb6c7672 100644 --- a/src/circular_sector.scad +++ b/src/circular_sector.scad @@ -13,10 +13,8 @@ include <__private__/__frags.scad>; module circular_sector(radius, angles) { - function unit_xy(a) = [cos(a), sin(a)]; frags = __frags(radius); - a_step = 360 / frags; m = floor(angles[0] / a_step) + 1; @@ -24,9 +22,11 @@ module circular_sector(radius, angles) { half_a_step = a_step / 2; leng = radius * cos(half_a_step); - + + function unit_xy(a) = [cos(a), sin(a)]; + function edge_r_begin(a) = - leng / cos(m * a_step - half_a_step - a); + leng / cos((m - 0.5) * a_step - a); function edge_r_end(a) = leng / cos((n + 0.5) * a_step - a);