diff options
author | opiopan <opiopan@gmail.com> | 2019-04-07 22:22:33 +0900 |
---|---|---|
committer | opiopan <opiopan@gmail.com> | 2019-04-07 22:22:33 +0900 |
commit | e3c59e39cf9bc64ce9d76c324b82956a65515f16 (patch) | |
tree | 96a87bab252420c14d955ad4c1d59a5101b77cf4 /gerberex/utility.py | |
parent | d53293a609a83aa945af6864285b90d36bcbdd69 (diff) | |
download | gerbonara-e3c59e39cf9bc64ce9d76c324b82956a65515f16.tar.gz gerbonara-e3c59e39cf9bc64ce9d76c324b82956a65515f16.tar.bz2 gerbonara-e3c59e39cf9bc64ce9d76c324b82956a65515f16.zip |
expand test and fix many issues
Diffstat (limited to 'gerberex/utility.py')
-rw-r--r-- | gerberex/utility.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/gerberex/utility.py b/gerberex/utility.py index f90df96..4c89fa6 100644 --- a/gerberex/utility.py +++ b/gerberex/utility.py @@ -13,8 +13,7 @@ def rotate(x, y, angle, center): sin(angle) * x0 + cos(angle) * y0 + center[1]) def is_equal_value(a, b, error_range=0): - return a - b <= error_range and a - b >= -error_range - + return (a - b) * (a - b) <= error_range * error_range def is_equal_point(a, b, error_range=0): return is_equal_value(a[0], b[0], error_range) and \ |