diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2008-04-24 14:05:46 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2008-04-24 14:05:46 +0000 |
commit | 3eaaf7ae225f591af24ebbd85d1a836d84844991 (patch) | |
tree | d36f3fb93e9f8e5e06cedbe482a3e1394b41b990 /basegfx | |
parent | cce4efddc5481277d9f2829b3a1d57661080ed18 (diff) |
INTEGRATION: CWS aw055 (1.13.50); FILE MERGED
2008/02/29 04:31:27 aw 1.13.50.1: removed op equal at polygons, added to tooling. Done for 2D and 3D
Diffstat (limited to 'basegfx')
-rw-r--r-- | basegfx/inc/basegfx/tuple/b2dtuple.hxx | 32 |
1 files changed, 27 insertions, 5 deletions
diff --git a/basegfx/inc/basegfx/tuple/b2dtuple.hxx b/basegfx/inc/basegfx/tuple/b2dtuple.hxx index a3f320853e68..686e86de8e74 100644 --- a/basegfx/inc/basegfx/tuple/b2dtuple.hxx +++ b/basegfx/inc/basegfx/tuple/b2dtuple.hxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: b2dtuple.hxx,v $ - * $Revision: 1.14 $ + * $Revision: 1.15 $ * * This file is part of OpenOffice.org. * @@ -33,6 +33,10 @@ #include <sal/types.h> +#ifndef _BGFX_NUMERIC_FTOOLS_HXX +#include <basegfx/numeric/ftools.hxx> +#endif + namespace basegfx { // predeclarations @@ -142,13 +146,31 @@ namespace basegfx // comparators with tolerance ////////////////////////////////////////////////////////////////////// - bool equalZero() const; + bool equalZero() const + { + return (this == &getEmptyTuple() || + (fTools::equalZero(mfX) && fTools::equalZero(mfY))); + } - bool equalZero(const double& rfSmallValue) const; + bool equalZero(const double& rfSmallValue) const + { + return (this == &getEmptyTuple() || + (fTools::equalZero(mfX, rfSmallValue) && fTools::equalZero(mfY, rfSmallValue))); + } - bool equal(const B2DTuple& rTup) const; + bool equal(const B2DTuple& rTup) const + { + return ( + fTools::equal(mfX, rTup.mfX) && + fTools::equal(mfY, rTup.mfY)); + } - bool equal(const B2DTuple& rTup, const double& rfSmallValue) const; + bool equal(const B2DTuple& rTup, const double& rfSmallValue) const + { + return ( + fTools::equal(mfX, rTup.mfX, rfSmallValue) && + fTools::equal(mfY, rTup.mfY, rfSmallValue)); + } // operators ////////////////////////////////////////////////////////////////////// |