diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2018-03-19 19:56:15 +0100 |
commit | 1542c122b3672fe83e027411ad2445772e2d0ed3 (patch) | |
tree | e535bc621bd7ffa9d5ce89e0d495df5d1c4ab6fd /app/bin/bdf2xtp.c | |
parent | 773810e6583142d7d15263e6481c42aebed6d7f1 (diff) | |
parent | d1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff) |
Update upstream source from tag 'upstream/5.1.0'
Update to upstream version '5.1.0'
with Debian dir 93ca74b8b4602fce4c9c7740e0cfdde25f086673
Diffstat (limited to 'app/bin/bdf2xtp.c')
-rw-r--r-- | app/bin/bdf2xtp.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/bin/bdf2xtp.c b/app/bin/bdf2xtp.c index adc2b04..76fb31a 100644 --- a/app/bin/bdf2xtp.c +++ b/app/bin/bdf2xtp.c @@ -134,21 +134,17 @@ double findDistance( coOrd p0, coOrd p1 ) int small(double v ) /* is <v> close to 0.0 */ { - return (fabs(v) < 0.0001); + return (fabs(v) < 0.000000000001); } double findAngle( coOrd p0, coOrd p1 ) /* find angle between two points */ { double dx = p1.x-p0.x, dy = p1.y-p0.y; - if (small(dx)) { - if (dy >=0) return 0.0; + if (small(dx) && small(dy)) { + if (dy >=0.0) return 0.0; else return 180.0; } - if (small(dy)) { - if (dx >=0) return 90.0; - else return 270.0; - } return R2D(atan2( dx,dy )); } |