From 572bafb01f4310027caf0a8594da6f0615c3aa79 Mon Sep 17 00:00:00 2001 From: Matthias Grob Date: Tue, 14 Jul 2020 09:31:43 +0200 Subject: [PATCH] Quaternion: use template type for division by two --- matrix/Quaternion.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/matrix/Quaternion.hpp b/matrix/Quaternion.hpp index 1e8ca2b6ca..5bd23457e5 100644 --- a/matrix/Quaternion.hpp +++ b/matrix/Quaternion.hpp @@ -174,7 +174,7 @@ public: q(1) = q(2) = q(3) = 0; } else { Type magnitude = sin(angle / Type(2)); - q(0) = cos(angle / 2.0f); + q(0) = cos(angle / Type(2)); q(1) = axis(0) * magnitude; q(2) = axis(1) * magnitude; q(3) = axis(2) * magnitude;