diff options
author | Noel Grandin <noel@peralex.com> | 2014-02-21 16:14:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-02-25 15:16:57 +0200 |
commit | f45ff6b468a22e52104fc41466e384e0548a85e6 (patch) | |
tree | ea067dfe39fd04d6353199bf689ac945aceb757e | |
parent | ffdd5d304779e7ec7cdf7d4f5dbeb24584970c6b (diff) |
remove unused code basegfx::snapToNearestMultiple(double, double)
Change-Id: If708227af22e834a0aecbeca12ce99b1240443c7
-rw-r--r-- | basegfx/source/numeric/ftools.cxx | 23 | ||||
-rw-r--r-- | include/basegfx/numeric/ftools.hxx | 12 | ||||
-rw-r--r-- | unusedcode.easy | 1 |
3 files changed, 0 insertions, 36 deletions
diff --git a/basegfx/source/numeric/ftools.cxx b/basegfx/source/numeric/ftools.cxx index a3a27a7a50c8..6816fb3145d1 100644 --- a/basegfx/source/numeric/ftools.cxx +++ b/basegfx/source/numeric/ftools.cxx @@ -25,29 +25,6 @@ namespace basegfx // init static member of class fTools double ::basegfx::fTools::mfSmallValue = 0.000000001; - double snapToNearestMultiple(double v, const double fStep) - { - if(fTools::equalZero(fStep)) - { - // with a zero step, all snaps to 0.0 - return 0.0; - } - else - { - const double fHalfStep(fStep * 0.5); - const double fChange(fHalfStep - fmod(v + fHalfStep, fStep)); - - if(basegfx::fTools::equal(fabs(v), fabs(fChange))) - { - return 0.0; - } - else - { - return v + fChange; - } - } - } - double snapToZeroRange(double v, double fWidth) { if(fTools::equalZero(fWidth)) diff --git a/include/basegfx/numeric/ftools.hxx b/include/basegfx/numeric/ftools.hxx index 2e327df4587d..5ce21f7bf95f 100644 --- a/include/basegfx/numeric/ftools.hxx +++ b/include/basegfx/numeric/ftools.hxx @@ -136,18 +136,6 @@ namespace basegfx return v / M_PI_2 * 90.0; } - /** Snap v to nearest multiple of fStep, from negative and - positive side. - - Examples: - - snapToNearestMultiple(-0.1, 0.5) = 0.0 - snapToNearestMultiple(0.1, 0.5) = 0.0 - snapToNearestMultiple(0.25, 0.5) = 0.0 - snapToNearestMultiple(0.26, 0.5) = 0.5 - */ - double snapToNearestMultiple(double v, const double fStep); - /** Snap v to the range [0.0 .. fWidth] using modulo */ double snapToZeroRange(double v, double fWidth); diff --git a/unusedcode.easy b/unusedcode.easy index 5de3a502dfd3..69cf145740ca 100644 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -277,7 +277,6 @@ apitest::XText::testInsertRemoveTextContent() apitest::XTextContent::testAttach() apitest::XTextContent::testGetAnchor() apitest::XTextField::testGetPresentation() -basegfx::snapToNearestMultiple(double, double) basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon const&) basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&) basegfx::tools::equal(basegfx::B3DPolyPolygon const&, basegfx::B3DPolyPolygon const&) |