diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-31 13:14:21 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2014-01-31 18:49:22 +0100 |
commit | fbcb4011c261449ea35416fdba121dc9ec2fc585 (patch) | |
tree | eaae5b9d49ea2ac8579035981a40a1a199d5531e /chart2/source | |
parent | f5fd26fda6e17ff5c4a59e544512b3970fdb8a3e (diff) |
use fmod and make code simpler
Change-Id: I09cc4fa8288fafa78083da5bdfb8ddc6fc273da9
Diffstat (limited to 'chart2/source')
-rw-r--r-- | chart2/source/view/main/DummyXShape.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index 44da9175e5c7..d7dcf1dfb9a6 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -351,9 +351,8 @@ void DummyPieSegment2D::render() { DummyChart* pChart = getRootShape(); - while(mfUnitCircleWidthAngleDegree>360) - mfUnitCircleWidthAngleDegree -= 360.0; - while(mfUnitCircleWidthAngleDegree<0) + mfUnitCircleWidthAngleDegree = std::fmod(mfUnitCircleWidthAngleDegree, 360.0); + if(mfUnitCircleWidthAngleDegree) mfUnitCircleWidthAngleDegree += 360.0; pChart->m_GLRender.GeneratePieSegment2D(mfUnitCircleInnerRadius, mfUnitCircleOuterRadius, |