From: Matthew Fernandez Date: Mon, 17 May 2021 02:33:11 +0000 (-0700) Subject: consistently use float arithmetic in axis_to_quat X-Git-Tag: 2.47.3~24^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2aed5de354f4b89bb1c33e910ba84f0749bfe00e;p=graphviz consistently use float arithmetic in axis_to_quat By avoiding mixing doubles and floats, we avoid ever down-converting from a float to a double and losing precision. Squashes some -Wfloat-conversion warnings. --- diff --git a/cmd/smyrna/trackball.c b/cmd/smyrna/trackball.c index c160023c8..a49ad5cce 100644 --- a/cmd/smyrna/trackball.c +++ b/cmd/smyrna/trackball.c @@ -195,8 +195,8 @@ void axis_to_quat(float a[3], float phi, float q[4]) { vnormal(a); vcopy(a, q); - vscale(q, sin(phi / 2.0)); - q[3] = cos(phi / 2.0); + vscale(q, sinf(phi / 2.0f)); + q[3] = cosf(phi / 2.0f); } /*