From a7db6de6cc11de8b084ef3b9061a4b40a9c08a2b Mon Sep 17 00:00:00 2001 From: johanengelen Date: Fri, 1 Aug 2008 19:50:41 +0000 Subject: [PATCH] update to latest 2geom --- src/2geom/matrix.cpp | 2 +- src/2geom/rect.h | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/2geom/matrix.cpp b/src/2geom/matrix.cpp index 6286de86e..04a21d624 100644 --- a/src/2geom/matrix.cpp +++ b/src/2geom/matrix.cpp @@ -148,7 +148,7 @@ bool Matrix::isUniformScale(Coord const eps) const { \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 a136e91a8..fa79201e8 100644 --- a/src/2geom/rect.h +++ b/src/2geom/rect.h @@ -55,11 +55,9 @@ class D2 { 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() { f[X] = f[Y] = Interval(0, 0); } + D2() { f[X] = f[Y] = Interval(); } D2(Interval const &a, Interval const &b) { f[X] = a; -- 2.30.2