From adaeb0e1eff41199e11c079af0c0b092e4f08c37 Mon Sep 17 00:00:00 2001 From: Claudio Zambaldi Date: Mon, 3 May 2010 18:27:19 +0000 Subject: [PATCH] rotation axis is undefined for small angles and therefore gets a NaN --- code/math.f90 | 1 + 1 file changed, 1 insertion(+) diff --git a/code/math.f90 b/code/math.f90 index e826cdecd..502f02cdc 100644 --- a/code/math.f90 +++ b/code/math.f90 @@ -1391,6 +1391,7 @@ pure function math_transpose3x3(A) if (sinHalfAngle <= 1.0e-4_pReal) then ! very small rotation angle? math_QuaternionToAxisAngle = 0.0_pReal + math_QuaternionToAxisAngle(1:3) = NaN else math_QuaternionToAxisAngle(1:3) = Q(2:4)/sinHalfAngle math_QuaternionToAxisAngle(4) = halfAngle*2.0_pReal*inDeg