summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 40c9f12)
raw | patch | inline | side by side (parent: 40c9f12)
| author | buliabyak <buliabyak@users.sourceforge.net> | |
| Sat, 1 Mar 2008 22:24:40 +0000 (22:24 +0000) | ||
| committer | buliabyak <buliabyak@users.sourceforge.net> | |
| Sat, 1 Mar 2008 22:24:40 +0000 (22:24 +0000) |
index 90cbaf5859bcbc026a953a6214a5f37a800384a9..0079d3f765968d773359b0d68356b6405a1f3e20 100644 (file)
ret[0] /= s[X]; ret[1] /= s[Y];
ret[2] /= s[X]; ret[3] /= s[Y];
ret[4] /= s[X]; ret[5] /= s[Y];
- assert_close( ret, m * NR::Matrix(s.inverse()) );
return ret;
}
ret[0] *= s[X]; ret[1] *= s[Y];
ret[2] *= s[X]; ret[3] *= s[Y];
ret[4] *= s[X]; ret[5] *= s[Y];
- assert_close( ret, m * NR::Matrix(s) );
return ret;
}
index 0ccdcf9ce1d42796d540b83dafc2ce6d0cfab451..554b5790adad775d12f6f27d34bdf142658f839c 100644 (file)
Matrix ret(m);
ret[4] += t[X];
ret[5] += t[Y];
- assert_close( ret, m * Matrix(t) );
return ret;
}
index db01b966edd19bdedd2329a1a9377028caa43925..ed482f46f17ea1253fb9ef763038f0965e28a964 100644 (file)
--- a/src/libnr/nr-matrix.cpp
+++ b/src/libnr/nr-matrix.cpp
@@ -590,28 +590,6 @@ bool matrix_equalp(Matrix const &m0, Matrix const &m1, NR::Coord const epsilon)
-
-
-/**
- * A home-made assertion. Stop if the two matrixes are not 'close' to
- * each other.
- */
-void assert_close(Matrix const &a, Matrix const &b)
-{
- if (!matrix_equalp(a, b, 1e-3)) {
- fprintf(stderr,
- "a = | %g %g |,\tb = | %g %g |\n"
- " | %g %g | \t | %g %g |\n"
- " | %g %g | \t | %g %g |\n",
- a[0], a[1], b[0], b[1],
- a[2], a[3], b[2], b[3],
- a[4], a[5], b[4], b[5]);
- std::abort();
- }
-}
-
-
-
} //namespace NR
diff --git a/src/libnr/nr-matrix.h b/src/libnr/nr-matrix.h
index f4164d3e786496f4b876cc780809549df4f632db..a8af553b6239fef01ac437e087db90dc30bcbad6 100644 (file)
--- a/src/libnr/nr-matrix.h
+++ b/src/libnr/nr-matrix.h
return out_file;
}
-extern void assert_close(Matrix const &a, Matrix const &b);
-
} /* namespace NR */
index ce5120079dd2dd92311ac0ce757602a3826b46d0..5b19efaea18b36825f68a325052126efda75616a 100644 (file)
ret[1] *= s[X];
ret[2] *= s[Y];
ret[3] *= s[Y];
- assert_close( ret, NR::Matrix(s) * m );
return ret;
}
index d03caf4ffd28d749bce923925e94b348a9b853af..47f362f9f39243960fca9274f941448fbf3e08ad 100644 (file)
Matrix ret(m);
ret[4] += m[0] * t[X] + m[2] * t[Y];
ret[5] += m[1] * t[X] + m[3] * t[Y];
- assert_close( ret, Matrix(t) * m );
return ret;
}
index b995bbad56d6ae940b7874f322d326cb0f37a354..83e5e8e654998b1bebc2ec1c9b8621937525fb9d 100644 (file)
NR::Matrix ret(s);
ret[4] = t[X] * s[X];
ret[5] = t[Y] * s[Y];
- assert_close( ret, NR::Matrix(t) * NR::Matrix(s) );
return ret;
}