]> granicus.if.org Git - graphviz/commitdiff
ortho LENGTH: rephras an open coded 'hypot'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 6 Mar 2022 23:06:43 +0000 (15:06 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 9 Mar 2022 07:33:29 +0000 (23:33 -0800)
lib/ortho/partition.c

index 69b1dbcfd0660152924dccb4c5adb950dc69d441..6a4ce218fbfc66963c60886a5752aa59bfc84e08 100644 (file)
@@ -39,7 +39,7 @@
 
 #define DOT(v0, v1) ((v0).x * (v1).x + (v0).y * (v1).y)
 #define CROSS_SINE(v0, v1) ((v0).x * (v1).y - (v1).x * (v0).y)
-#define LENGTH(v0) (sqrt((v0).x * (v0).x + (v0).y * (v0).y))
+#define LENGTH(v0) hypot((v0).x, (v0).y)
 
 #ifndef HAVE_SRAND48
 #define srand48 srand