]> granicus.if.org Git - graphviz/commitdiff
neatogen dist: rephrase an open coded 'hypot'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 23:01:05 +0000 (15:01 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Mar 2022 07:33:29 +0000 (23:33 -0800)
lib/neatogen/site.c

index 91f5a9607614f9f85fcac75fe0a8084d470a1cd0..501fad2d655d95f64855b0f2134f1e7a1331edbc 100644 (file)
@@ -38,7 +38,7 @@ double dist(Site * s, Site * t)
 
     dx = s->coord.x - t->coord.x;
     dy = s->coord.y - t->coord.y;
-    ans = sqrt(dx * dx + dy * dy);
+    ans = hypot(dx, dy);
     return ans;
 }