From: Matthew Fernandez Date: Mon, 17 May 2021 02:29:07 +0000 (-0700) Subject: abbreviate some manual fmaxf and fminf operations X-Git-Tag: 2.47.3~24^2~6 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68b8414b3b3659f7f39493bcffb2fd1775d94ae2;p=graphviz abbreviate some manual fmaxf and fminf operations --- diff --git a/cmd/smyrna/trackball.c b/cmd/smyrna/trackball.c index 91f87ace3..9c0f61bf3 100644 --- a/cmd/smyrna/trackball.c +++ b/cmd/smyrna/trackball.c @@ -181,10 +181,8 @@ void trackball(float q[4], float p1x, float p1y, float p2x, float p2y) /* * Avoid problems with out-of-control values... */ - if (t > 1.0f) - t = 1.0f; - if (t < -1.0f) - t = -1.0f; + t = fminf(t, 1.0f); + t = fmaxf(t, -1.0f); phi = 2.0f * asinf(t); axis_to_quat(a, phi, q);