]> git.tdb.fi Git - libs/math.git/commitdiff
Fix AffineTransformation::translate
authorMikko Rasa <tdb@tdb.fi>
Sat, 18 May 2013 18:32:52 +0000 (21:32 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sat, 18 May 2013 18:32:52 +0000 (21:32 +0300)
Translation coordinates go in the last column, not in the last row.

source/geometry/affinetransformation.h

index e0ca370d66aa74b918f307497a065cc3deea396c..93fb91abf29f9955ffc83cf9307092a4ff78c2cb 100644 (file)
@@ -81,7 +81,7 @@ AffineTransformation<T, D> AffineTransformation<T, D>::translation(const LinAl::
 {
        AffineTransformation<T, D> r;
        for(unsigned i=0; i<D; ++i)
-               r.matrix(D, i) = v[i];
+               r.matrix(i, D) = v[i];
        return r;
 }