diff options
author | jaseg <git@jaseg.de> | 2023-10-26 23:53:23 +0200 |
---|---|---|
committer | jaseg <git@jaseg.de> | 2023-10-26 23:53:23 +0200 |
commit | 36da1fd68bcfb44957d370584231545cee0b2e20 (patch) | |
tree | 7bf1730a71392ab3de33010a56edf3ce0a2a09e6 /gerbonara/utils.py | |
parent | 9624e46147755d221c8e7cf519e9ecd416381857 (diff) | |
download | gerbonara-36da1fd68bcfb44957d370584231545cee0b2e20.tar.gz gerbonara-36da1fd68bcfb44957d370584231545cee0b2e20.tar.bz2 gerbonara-36da1fd68bcfb44957d370584231545cee0b2e20.zip |
Fix failing test cases
Diffstat (limited to 'gerbonara/utils.py')
-rw-r--r-- | gerbonara/utils.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gerbonara/utils.py b/gerbonara/utils.py index 0e6a085..6d8445d 100644 --- a/gerbonara/utils.py +++ b/gerbonara/utils.py @@ -286,9 +286,9 @@ def approximate_arc(cx, cy, x1, y1, x2, y2, clockwise, max_error=1e-2, clip_max_ l = math.sqrt(r**2 - (r - max_error)**2) angle_max = math.asin(l/r) - sweep_angle = sweep_angle(cx, cy, x1, y1, x2, y2, clockwise) - num_segments = math.ceil(sweep_angle / angle_max) - angle = sweep_angle / num_segments + alpha = sweep_angle(cx, cy, x1, y1, x2, y2, clockwise) + num_segments = math.ceil(alpha / angle_max) + angle = alpha / num_segments if not clockwise: angle = -angle |