From 7f83000b93150d67ff5856c51f156647e7791467 Mon Sep 17 00:00:00 2001 From: mtarini Date: Fri, 21 Aug 2009 12:42:16 +0000 Subject: [PATCH] fixed a nasty bug in Matrix44::ToEulerAngles (but it still suffers from Gimbal Lock) --- vcg/math/deprecated_matrix44.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcg/math/deprecated_matrix44.h b/vcg/math/deprecated_matrix44.h index 5c8c765a..45f70f7a 100644 --- a/vcg/math/deprecated_matrix44.h +++ b/vcg/math/deprecated_matrix44.h @@ -498,7 +498,7 @@ void Matrix44::ToEulerAngles(T &alpha, T &beta, T &gamma) { alpha = atan2(ElementAt(1,2), ElementAt(2,2)); beta = asin(-ElementAt(0,2)); - gamma = atan2(ElementAt(0,1), ElementAt(1,1)); + gamma = atan2(ElementAt(0,1), ElementAt(0,0)); } template