toon-members
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Toon-members] tag/src absorient.cpp


From: Gerhard Reitmayr
Subject: [Toon-members] tag/src absorient.cpp
Date: Fri, 08 May 2009 12:08:11 +0000

CVSROOT:        /cvsroot/toon
Module name:    tag
Changes by:     Gerhard Reitmayr <gerhard>      09/05/08 12:08:11

Modified files:
        src            : absorient.cpp 

Log message:
        more robust

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/tag/src/absorient.cpp?cvsroot=toon&r1=1.8&r2=1.9

Patches:
Index: absorient.cpp
===================================================================
RCS file: /cvsroot/toon/tag/src/absorient.cpp,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- absorient.cpp       6 May 2009 12:52:20 -0000       1.8
+++ absorient.cpp       8 May 2009 12:08:11 -0000       1.9
@@ -60,7 +60,7 @@
 // computes the orientation from (e1,e2,e3) -> (a,(a^b)^a,a^b), which means 
that b the second vector is in the a, b plane
 static inline TooN::SO3<>  canonicalOrientation( const TooN::Vector<3> & a, 
const TooN::Vector<3> & b ){
     TooN::Vector<3> n = a ^ b;
-    if(norm_sq(n) == 0)
+    if(norm_sq(n) < 1e-30)
        return TooN::SO3<>();
     TooN::Matrix<3> result;
     result.T()[0] = unit(a);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]