Kaydet (Commit) f45ff6b4 authored tarafından Noel Grandin's avatar Noel Grandin

remove unused code basegfx::snapToNearestMultiple(double, double)

Change-Id: If708227af22e834a0aecbeca12ce99b1240443c7
üst ffdd5d30
...@@ -25,29 +25,6 @@ namespace basegfx ...@@ -25,29 +25,6 @@ namespace basegfx
// init static member of class fTools // init static member of class fTools
double ::basegfx::fTools::mfSmallValue = 0.000000001; 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) double snapToZeroRange(double v, double fWidth)
{ {
if(fTools::equalZero(fWidth)) if(fTools::equalZero(fWidth))
......
...@@ -136,18 +136,6 @@ namespace basegfx ...@@ -136,18 +136,6 @@ namespace basegfx
return v / M_PI_2 * 90.0; 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 /** Snap v to the range [0.0 .. fWidth] using modulo
*/ */
double snapToZeroRange(double v, double fWidth); double snapToZeroRange(double v, double fWidth);
......
...@@ -277,7 +277,6 @@ apitest::XText::testInsertRemoveTextContent() ...@@ -277,7 +277,6 @@ apitest::XText::testInsertRemoveTextContent()
apitest::XTextContent::testAttach() apitest::XTextContent::testAttach()
apitest::XTextContent::testGetAnchor() apitest::XTextContent::testGetAnchor()
apitest::XTextField::testGetPresentation() apitest::XTextField::testGetPresentation()
basegfx::snapToNearestMultiple(double, double)
basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon const&) basegfx::tools::containsOnlyHorizontalAndVerticalEdges(basegfx::B2DPolyPolygon const&)
basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&) basegfx::tools::equal(basegfx::B2DPolygon const&, basegfx::B2DPolygon const&, double const&)
basegfx::tools::equal(basegfx::B3DPolyPolygon const&, basegfx::B3DPolyPolygon const&) basegfx::tools::equal(basegfx::B3DPolyPolygon const&, basegfx::B3DPolyPolygon const&)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment