]> granicus.if.org Git - graphviz/commitdiff
use float square root function withing getEdgeLength
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 2 May 2021 03:36:35 +0000 (20:36 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sun, 16 May 2021 16:40:29 +0000 (09:40 -0700)
Like prior commits in this series, this avoids using the double function with
float arguments.

cmd/smyrna/topviewfuncs.c

index 5f929330d9f5da2a6e736d8c51b986071eba09f8..4ad51c97fca5bde7ef474e0b31629a4bf52eafab 100644 (file)
@@ -117,7 +117,7 @@ static GLfloat getEdgeLength(Agedge_t *  edge)
     A=getEdgeTail(edge);
     B=getEdgeHead(edge);
     rv=(A.x-B.x)*(A.x-B.x) + (A.y-B.y)*(A.y-B.y) +(A.z-B.z)*(A.z-B.z);
-    rv=sqrt(rv);
+    rv=sqrtf(rv);
     return rv;
 }
 static void glCompColorxlate(glCompColor* c,char* str)