summaryrefslogtreecommitdiff
path: root/include/basegfx/tuple/b2i64tuple.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-27 01:59:25 +0100
committerThorsten Behrens <Thorsten.Behrens@CIB.de>2015-10-27 02:33:18 +0000
commit3ce9af420afafa1a81de646220706fcdc8d84b55 (patch)
treefc73bb3f66a8bd7973cff8615de7feaa61c5a49d /include/basegfx/tuple/b2i64tuple.hxx
parent64de38cf8eec4c0ff21fa886b616182acd8600a2 (diff)
loplugin:unusedmethods
Change-Id: I73180266c0af98dbd8d29bd3b11850996b94def9 Reviewed-on: https://gerrit.libreoffice.org/19195 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'include/basegfx/tuple/b2i64tuple.hxx')
-rw-r--r--include/basegfx/tuple/b2i64tuple.hxx117
1 files changed, 0 insertions, 117 deletions
diff --git a/include/basegfx/tuple/b2i64tuple.hxx b/include/basegfx/tuple/b2i64tuple.hxx
index e4b40acff289..5c5aac7cdbaa 100644
--- a/include/basegfx/tuple/b2i64tuple.hxx
+++ b/include/basegfx/tuple/b2i64tuple.hxx
@@ -177,123 +177,6 @@ namespace basegfx
}
};
- // external operators
-
-
- inline B2I64Tuple minimum(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- return B2I64Tuple(
- std::min(rTupB.getX(), rTupA.getX()),
- std::min(rTupB.getY(), rTupA.getY()));
- }
-
- inline B2I64Tuple maximum(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- return B2I64Tuple(
- std::max(rTupB.getX(), rTupA.getX()),
- std::max(rTupB.getY(), rTupA.getY()));
- }
-
- inline B2I64Tuple absolute(const B2I64Tuple& rTup)
- {
- B2I64Tuple aAbs(
- (0 > rTup.getX()) ? -rTup.getX() : rTup.getX(),
- (0 > rTup.getY()) ? -rTup.getY() : rTup.getY());
- return aAbs;
- }
-
- inline B2I64Tuple interpolate(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2, double t)
- {
- if(rOld1 == rOld2)
- {
- return rOld1;
- }
- else if(0.0 >= t)
- {
- return rOld1;
- }
- else if(1.0 <= t)
- {
- return rOld2;
- }
- else
- {
- return B2I64Tuple(
- basegfx::fround64(((rOld2.getX() - rOld1.getX()) * t) + rOld1.getX()),
- basegfx::fround64(((rOld2.getY() - rOld1.getY()) * t) + rOld1.getY()));
- }
- }
-
- inline B2I64Tuple average(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2)
- {
- return B2I64Tuple(
- rOld1.getX() == rOld2.getX() ? rOld1.getX() : basegfx::fround64((rOld1.getX() + rOld2.getX()) * 0.5),
- rOld1.getY() == rOld2.getY() ? rOld1.getY() : basegfx::fround64((rOld1.getY() + rOld2.getY()) * 0.5));
- }
-
- inline B2I64Tuple average(const B2I64Tuple& rOld1, const B2I64Tuple& rOld2, const B2I64Tuple& rOld3)
- {
- return B2I64Tuple(
- (rOld1.getX() == rOld2.getX() && rOld2.getX() == rOld3.getX()) ? rOld1.getX() : basegfx::fround64((rOld1.getX() + rOld2.getX() + rOld3.getX()) * (1.0 / 3.0)),
- (rOld1.getY() == rOld2.getY() && rOld2.getY() == rOld3.getY()) ? rOld1.getY() : basegfx::fround64((rOld1.getY() + rOld2.getY() + rOld3.getY()) * (1.0 / 3.0)));
- }
-
- inline B2I64Tuple operator+(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- B2I64Tuple aSum(rTupA);
- aSum += rTupB;
- return aSum;
- }
-
- inline B2I64Tuple operator-(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- B2I64Tuple aSub(rTupA);
- aSub -= rTupB;
- return aSub;
- }
-
- inline B2I64Tuple operator/(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- B2I64Tuple aDiv(rTupA);
- aDiv /= rTupB;
- return aDiv;
- }
-
- inline B2I64Tuple operator*(const B2I64Tuple& rTupA, const B2I64Tuple& rTupB)
- {
- B2I64Tuple aMul(rTupA);
- aMul *= rTupB;
- return aMul;
- }
-
- inline B2I64Tuple operator*(const B2I64Tuple& rTup, sal_Int64 t)
- {
- B2I64Tuple aNew(rTup);
- aNew *= t;
- return aNew;
- }
-
- inline B2I64Tuple operator*(sal_Int64 t, const B2I64Tuple& rTup)
- {
- B2I64Tuple aNew(rTup);
- aNew *= t;
- return aNew;
- }
-
- inline B2I64Tuple operator/(const B2I64Tuple& rTup, sal_Int64 t)
- {
- B2I64Tuple aNew(rTup);
- aNew /= t;
- return aNew;
- }
-
- inline B2I64Tuple operator/(sal_Int64 t, const B2I64Tuple& rTup)
- {
- B2I64Tuple aNew(t, t);
- B2I64Tuple aTmp(rTup);
- aNew /= aTmp;
- return aNew;
- }
} // end of namespace basegfx
#endif // INCLUDED_BASEGFX_TUPLE_B2I64TUPLE_HXX