diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-09-06 19:37:20 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-09-10 08:45:51 +0200 |
commit | c2d3f4be406b3bef8e89b17b781cb7e827a0fe3d (patch) | |
tree | da92ca1958f556804d3a73183dc2a904ca4bc416 /include/basegfx/tuple/b2dtuple.hxx | |
parent | 0252b7bdec3693096bb52c67d335c0e9e662e185 (diff) |
basegfx: simplify Tuple2D, B2DPoint, B2DVector, B2DTuple
Change-Id: I97e41fc62288ec4ee5805747fd3a3a6e019cfb57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139681
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/basegfx/tuple/b2dtuple.hxx')
-rw-r--r-- | include/basegfx/tuple/b2dtuple.hxx | 32 |
1 files changed, 4 insertions, 28 deletions
diff --git a/include/basegfx/tuple/b2dtuple.hxx b/include/basegfx/tuple/b2dtuple.hxx index c47b7b898c17..30b5587f7bd8 100644 --- a/include/basegfx/tuple/b2dtuple.hxx +++ b/include/basegfx/tuple/b2dtuple.hxx @@ -61,6 +61,10 @@ namespace basegfx : Tuple2D(fX, fY) {} + B2DTuple(Tuple2D<double> const& rTuple) + : Tuple2D(rTuple) + {} + /** Create a copy of a 2D integer Tuple @param rTup @@ -118,34 +122,6 @@ namespace basegfx rtl_math_approxEqual(rOld1.getY(), rOld2.getY()) ? rOld1.getY() : (rOld1.getY() + rOld2.getY()) * 0.5); } - inline B2DTuple operator+(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - B2DTuple aSum(rTupA); - aSum += rTupB; - return aSum; - } - - inline B2DTuple operator-(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - B2DTuple aSub(rTupA); - aSub -= rTupB; - return aSub; - } - - inline B2DTuple operator/(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - B2DTuple aDiv(rTupA); - aDiv /= rTupB; - return aDiv; - } - - inline B2DTuple operator*(const B2DTuple& rTupA, const B2DTuple& rTupB) - { - B2DTuple aMul(rTupA); - aMul *= rTupB; - return aMul; - } - inline B2DTuple operator*(const B2DTuple& rTup, double t) { B2DTuple aNew(rTup); |