summaryrefslogtreecommitdiff
path: root/basegfx/source/tuple
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2003-11-28 10:18:16 +0000
committerArmin Weiss <aw@openoffice.org>2003-11-28 10:18:16 +0000
commitd539c95155ccc7030411f7494704894a3ac610a8 (patch)
treedc3dbd283a5f501f6e48dd585d80bb158db920e3 /basegfx/source/tuple
parentce0ce72d1fd37f7b8e7cb4ebc372d8cd6b4ab9c0 (diff)
Removed in-between namespaces (curve, matrix, numeric, point, polygon, range, tuple, vector). Names were too common and e.g. vector leaded to problems with some defines. This is now avoided. Also some bug fixes, addition of 3d polygon tooling etc.
Diffstat (limited to 'basegfx/source/tuple')
-rw-r--r--basegfx/source/tuple/b2dtuple.cxx93
-rw-r--r--basegfx/source/tuple/b3dtuple.cxx11
2 files changed, 49 insertions, 55 deletions
diff --git a/basegfx/source/tuple/b2dtuple.cxx b/basegfx/source/tuple/b2dtuple.cxx
index a8cdfa54d663..1565fe3ea0d2 100644
--- a/basegfx/source/tuple/b2dtuple.cxx
+++ b/basegfx/source/tuple/b2dtuple.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b2dtuple.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: aw $ $Date: 2003-11-10 11:45:51 $
+ * last change: $Author: aw $ $Date: 2003-11-28 11:18:13 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,65 +69,62 @@
namespace basegfx
{
- namespace tuple
- {
- // initialize static member
- ::basegfx::tuple::B2DTuple B2DTuple::maEmptyTuple(0.0, 0.0);
+ // initialize static member
+ ::basegfx::B2DTuple B2DTuple::maEmptyTuple(0.0, 0.0);
- sal_Bool B2DTuple::equalZero() const
- {
- return (this == &maEmptyTuple ||
- (::basegfx::numeric::fTools::equalZero(mfX) && ::basegfx::numeric::fTools::equalZero(mfY)));
- }
+ sal_Bool B2DTuple::equalZero() const
+ {
+ return (this == &maEmptyTuple ||
+ (::basegfx::fTools::equalZero(mfX) && ::basegfx::fTools::equalZero(mfY)));
+ }
- sal_Bool B2DTuple::equalZero(const double& rfSmallValue) const
- {
- return (this == &maEmptyTuple ||
- (::basegfx::numeric::fTools::equalZero(mfX, rfSmallValue) && ::basegfx::numeric::fTools::equalZero(mfY, rfSmallValue)));
- }
+ sal_Bool B2DTuple::equalZero(const double& rfSmallValue) const
+ {
+ return (this == &maEmptyTuple ||
+ (::basegfx::fTools::equalZero(mfX, rfSmallValue) && ::basegfx::fTools::equalZero(mfY, rfSmallValue)));
+ }
- sal_Bool B2DTuple::equal(const B2DTuple& rTup) const
- {
- return (
- ::basegfx::numeric::fTools::equal(mfX, rTup.mfX) &&
- ::basegfx::numeric::fTools::equal(mfY, rTup.mfY));
- }
+ sal_Bool B2DTuple::equal(const B2DTuple& rTup) const
+ {
+ return (
+ ::basegfx::fTools::equal(mfX, rTup.mfX) &&
+ ::basegfx::fTools::equal(mfY, rTup.mfY));
+ }
- sal_Bool B2DTuple::equal(const B2DTuple& rTup, const double& rfSmallValue) const
- {
- return (
- ::basegfx::numeric::fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
- ::basegfx::numeric::fTools::equal(mfY, rTup.mfY, rfSmallValue));
- }
+ sal_Bool B2DTuple::equal(const B2DTuple& rTup, const double& rfSmallValue) const
+ {
+ return (
+ ::basegfx::fTools::equal(mfX, rTup.mfX, rfSmallValue) &&
+ ::basegfx::fTools::equal(mfY, rTup.mfY, rfSmallValue));
+ }
- void B2DTuple::correctValues(const double fCompareValue)
+ void B2DTuple::correctValues(const double fCompareValue)
+ {
+ if(0.0 == fCompareValue)
{
- if(0.0 == fCompareValue)
+ if(::basegfx::fTools::equalZero(mfX))
{
- if(::basegfx::numeric::fTools::equalZero(mfX))
- {
- mfX = 0.0;
- }
+ mfX = 0.0;
+ }
- if(::basegfx::numeric::fTools::equalZero(mfY))
- {
- mfY = 0.0;
- }
+ if(::basegfx::fTools::equalZero(mfY))
+ {
+ mfY = 0.0;
}
- else
+ }
+ else
+ {
+ if(::basegfx::fTools::equal(mfX, fCompareValue))
{
- if(::basegfx::numeric::fTools::equal(mfX, fCompareValue))
- {
- mfX = fCompareValue;
- }
+ mfX = fCompareValue;
+ }
- if(::basegfx::numeric::fTools::equal(mfY, fCompareValue))
- {
- mfY = fCompareValue;
- }
+ if(::basegfx::fTools::equal(mfY, fCompareValue))
+ {
+ mfY = fCompareValue;
}
}
- } // end of namespace tuple
+ }
} // end of namespace basegfx
// eof
diff --git a/basegfx/source/tuple/b3dtuple.cxx b/basegfx/source/tuple/b3dtuple.cxx
index f1e7691adfb3..718903f0864f 100644
--- a/basegfx/source/tuple/b3dtuple.cxx
+++ b/basegfx/source/tuple/b3dtuple.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dtuple.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: aw $ $Date: 2003-11-10 11:45:51 $
+ * last change: $Author: aw $ $Date: 2003-11-28 11:18:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,11 +65,8 @@
namespace basegfx
{
- namespace tuple
- {
- // initialize static member
- ::basegfx::tuple::B3DTuple B3DTuple::maEmptyTuple(0.0, 0.0, 0.0);
- } // end of namespace tuple
+ // initialize static member
+ ::basegfx::B3DTuple B3DTuple::maEmptyTuple(0.0, 0.0, 0.0);
} // end of namespace basegfx
// eof