summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3521f6)
raw | patch | inline | side by side (parent: c3521f6)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 1 Aug 2008 19:50:41 +0000 (19:50 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Fri, 1 Aug 2008 19:50:41 +0000 (19:50 +0000) |
src/2geom/matrix.cpp | patch | blob | history | |
src/2geom/rect.h | patch | blob | history |
diff --git a/src/2geom/matrix.cpp b/src/2geom/matrix.cpp
index 6286de86e6feb838de332a410ef36498b2d54318..04a21d624d0e78d7a43b51002fb397f7d1f89eec 100644 (file)
--- a/src/2geom/matrix.cpp
+++ b/src/2geom/matrix.cpp
\return A bool representing yes/no.
*/
bool Matrix::isRotation(Coord const eps) const {
- return !are_near(_c[0], _c[3], eps) && are_near(_c[1], -_c[2], eps) &&
+ return are_near(_c[0], _c[3], eps) && are_near(_c[1], -_c[2], eps) &&
are_near(_c[4], 0.0, eps) && are_near(_c[5], 0.0, eps) &&
are_near(_c[0]*_c[0] + _c[1]*_c[1], 1.0, eps);
}
diff --git a/src/2geom/rect.h b/src/2geom/rect.h
index a136e91a8f01e8883a7fadd24c08cc65a320dee9..fa79201e80ad5d67c895e62a60202b4b3472a4df 100644 (file)
--- a/src/2geom/rect.h
+++ b/src/2geom/rect.h
private:
Interval f[2];
public:
- /* The default constructor creates a rect that contains the point (0,0). Isn't it better to have it be empty?
- * i.e. f[X] = f[Y] = Interval(); . Don't use Interval(+COORD_HUGE, -COORD_HUGE) !! because the arguments
- * will be interchanged to Interval(-COORD_HUGE, +COORD_HUGE)!!
+ /* The default constructor creates an empty rect, constructed of two empty Intervals. (users rely on this!)
*/
- D2<Interval>() { f[X] = f[Y] = Interval(0, 0); }
+ D2<Interval>() { f[X] = f[Y] = Interval(); }
D2<Interval>(Interval const &a, Interval const &b) {
f[X] = a;