toon-members
[Top][All Lists]
Advanced

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

[Toon-members] TooN se3.h


From: Edward Rosten
Subject: [Toon-members] TooN se3.h
Date: Thu, 08 Apr 2010 16:12:30 +0000

CVSROOT:        /cvsroot/toon
Module name:    TooN
Changes by:     Edward Rosten <edrosten>        10/04/08 16:12:30

Modified files:
        .              : se3.h 

Log message:
        Fix to generic programming in SE3 by Hauke Strasdat.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/se3.h?cvsroot=toon&r1=1.27&r2=1.28

Patches:
Index: se3.h
===================================================================
RCS file: /cvsroot/toon/TooN/se3.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- se3.h       1 Feb 2010 17:33:18 -0000       1.27
+++ se3.h       8 Apr 2010 16:12:30 -0000       1.28
@@ -394,7 +394,7 @@
        const Vector<3,Precision> w = mu.template slice<3,3>();
        const Precision theta_sq = w*w;
        const Precision theta = sqrt(theta_sq);
-       double A, B;
+       Precision A, B;
        
        const Vector<3,Precision> cross = w ^ mu.template slice<0,3>();
        if (theta_sq < 1e-8) {
@@ -402,13 +402,13 @@
                B = 0.5;
                result.get_translation() = mu.template slice<0,3>() + 0.5 * 
cross;
        } else {
-               double C;
+               Precision C;
                if (theta_sq < 1e-6) {
                        C = one_6th*(1.0 - one_20th * theta_sq);
                        A = 1.0 - theta_sq * C;
                        B = 0.5 - 0.25 * one_6th * theta_sq;
                } else {
-                       const double inv_theta = 1.0/theta;
+                       const Precision inv_theta = 1.0/theta;
                        A = sin(theta) * inv_theta;
                        B = (1 - cos(theta)) * (inv_theta * inv_theta);
                        C = (1 - A) * (inv_theta * inv_theta);




reply via email to

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