diff options
| author | bulia byak <buliabyak@gmail.com> | 2008-03-01 22:24:40 +0000 |
|---|---|---|
| committer | buliabyak <buliabyak@users.sourceforge.net> | 2008-03-01 22:24:40 +0000 |
| commit | 9e0ac2b4acbb628a7ff51e779b5396569aed8269 (patch) | |
| tree | 872398fd3d7e4da46eb57e9cea07eabacf3ab0f2 /src | |
| parent | * [INTL: zh_CN] (trunk) Simplified Chinese update by Liu Xiaoqin (closes: #19... (diff) | |
| download | inkscape-9e0ac2b4acbb628a7ff51e779b5396569aed8269.tar.gz inkscape-9e0ac2b4acbb628a7ff51e779b5396569aed8269.zip | |
remove assert_close
(bzr r4916)
Diffstat (limited to 'src')
| -rw-r--r-- | src/libnr/nr-matrix-scale-ops.cpp | 2 | ||||
| -rw-r--r-- | src/libnr/nr-matrix-translate-ops.cpp | 1 | ||||
| -rw-r--r-- | src/libnr/nr-matrix.cpp | 22 | ||||
| -rw-r--r-- | src/libnr/nr-matrix.h | 2 | ||||
| -rw-r--r-- | src/libnr/nr-scale-matrix-ops.cpp | 1 | ||||
| -rw-r--r-- | src/libnr/nr-translate-matrix-ops.cpp | 1 | ||||
| -rw-r--r-- | src/libnr/nr-translate-scale-ops.cpp | 1 |
7 files changed, 0 insertions, 30 deletions
diff --git a/src/libnr/nr-matrix-scale-ops.cpp b/src/libnr/nr-matrix-scale-ops.cpp index 90cbaf585..0079d3f76 100644 --- a/src/libnr/nr-matrix-scale-ops.cpp +++ b/src/libnr/nr-matrix-scale-ops.cpp @@ -8,7 +8,6 @@ operator/(NR::Matrix const &m, NR::scale const &s) 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; } @@ -20,7 +19,6 @@ operator*(NR::Matrix const &m, NR::scale const &s) 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; } diff --git a/src/libnr/nr-matrix-translate-ops.cpp b/src/libnr/nr-matrix-translate-ops.cpp index 0ccdcf9ce..554b5790a 100644 --- a/src/libnr/nr-matrix-translate-ops.cpp +++ b/src/libnr/nr-matrix-translate-ops.cpp @@ -8,7 +8,6 @@ operator*(Matrix const &m, translate const &t) Matrix ret(m); ret[4] += t[X]; ret[5] += t[Y]; - assert_close( ret, m * Matrix(t) ); return ret; } diff --git a/src/libnr/nr-matrix.cpp b/src/libnr/nr-matrix.cpp index db01b966e..ed482f46f 100644 --- 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 f4164d3e7..a8af553b6 100644 --- a/src/libnr/nr-matrix.h +++ b/src/libnr/nr-matrix.h @@ -420,8 +420,6 @@ inline std::ostream &operator<< (std::ostream &out_file, const NR::Matrix &m) { return out_file; } -extern void assert_close(Matrix const &a, Matrix const &b); - } /* namespace NR */ diff --git a/src/libnr/nr-scale-matrix-ops.cpp b/src/libnr/nr-scale-matrix-ops.cpp index ce5120079..5b19efaea 100644 --- a/src/libnr/nr-scale-matrix-ops.cpp +++ b/src/libnr/nr-scale-matrix-ops.cpp @@ -9,7 +9,6 @@ operator*(NR::scale const &s, NR::Matrix const &m) ret[1] *= s[X]; ret[2] *= s[Y]; ret[3] *= s[Y]; - assert_close( ret, NR::Matrix(s) * m ); return ret; } diff --git a/src/libnr/nr-translate-matrix-ops.cpp b/src/libnr/nr-translate-matrix-ops.cpp index d03caf4ff..47f362f9f 100644 --- a/src/libnr/nr-translate-matrix-ops.cpp +++ b/src/libnr/nr-translate-matrix-ops.cpp @@ -8,7 +8,6 @@ operator*(translate const &t, Matrix const &m) 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; } diff --git a/src/libnr/nr-translate-scale-ops.cpp b/src/libnr/nr-translate-scale-ops.cpp index b995bbad5..83e5e8e65 100644 --- a/src/libnr/nr-translate-scale-ops.cpp +++ b/src/libnr/nr-translate-scale-ops.cpp @@ -8,7 +8,6 @@ operator*(NR::translate const &t, NR::scale const &s) 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; } |
