From 8e5e65734478a5bd4058f3d9828edd371309570e Mon Sep 17 00:00:00 2001 From: frohlich Date: Fri, 27 Feb 2009 05:16:52 +0000 Subject: [PATCH] Fix problem in unit quaternion return. Modified Files: SGQuat.hxx --- simgear/math/SGQuat.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simgear/math/SGQuat.hxx b/simgear/math/SGQuat.hxx index bb607885..1f6aaef0 100644 --- a/simgear/math/SGQuat.hxx +++ b/simgear/math/SGQuat.hxx @@ -213,7 +213,7 @@ public: { T nAxis = norm(axis); if (nAxis <= SGLimits::min()) - return SGQuat(1, 0, 0, 0); + return SGQuat::unit(); T angle2 = 0.5*nAxis; return fromRealImag(cos(angle2), T(sin(angle2)/nAxis)*axis); } -- 2.39.5