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

index ae8ec72c47eae078c643878269a88f696e560b7a..29ff42ab17900c16a3bf5e221fc2cf7a8d105912 100644 (file)
@@ -173,7 +173,7 @@ static double l2dist (pointf p0, pointf p1)
 {
     double delx = p0.x - p1.x;
     double dely = p0.y - p1.y;
-    return sqrt(delx*delx + dely*dely);
+    return hypot(delx, dely);
 }
 
 /* analyze current path, creating pathpoints array