Quaternion: use template type for division by two

This commit is contained in:
Matthias Grob
2020-07-20 18:44:08 +02:00
parent 242b38ee9e
commit 572bafb01f
+1 -1
View File
@@ -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;