aboutsummaryrefslogtreecommitdiff
path: root/MPChartLib
diff options
context:
space:
mode:
authorDaniel Cohen Gindi <Danielgindi@gmail.com>2016-08-14 08:54:20 +0300
committerGitHub <noreply@github.com>2016-08-14 08:54:20 +0300
commit3c8bf8cb94a796406e3dc17340f430009b3ea246 (patch)
treec722d4dc584fbba7c51bf34ee8edeb34dc920a50 /MPChartLib
parentd342760357eec29154c4f0ca6917398a79036621 (diff)
downloadMPAndroidChart-3c8bf8cb94a796406e3dc17340f430009b3ea246.tar.gz
Use an actual Epsilon here
Diffstat (limited to 'MPChartLib')
-rw-r--r--MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java b/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java
index 9535cc1f..a37fb0c3 100644
--- a/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java
+++ b/MPChartLib/src/main/java/com/github/mikephil/charting/renderer/PieChartRenderer.java
@@ -229,7 +229,7 @@ public class PieChartRenderer extends DataRenderer {
int visibleAngleCount = 0;
for (int j = 0; j < entryCount; j++) {
// draw only if the value is greater than zero
- if ((Math.abs(dataSet.getEntryForIndex(j).getY()) > 0.000001)) {
+ if ((Math.abs(dataSet.getEntryForIndex(j).getY()) > Utils.FLOAT_EPSILON)) {
visibleAngleCount++;
}
}
@@ -244,7 +244,7 @@ public class PieChartRenderer extends DataRenderer {
Entry e = dataSet.getEntryForIndex(j);
// draw only if the value is greater than zero
- if ((Math.abs(e.getY()) > 0.000001)) {
+ if ((Math.abs(e.getY()) > Utils.FLOAT_EPSILON)) {
if (!mChart.needsHighlight(j)) {
@@ -265,7 +265,7 @@ public class PieChartRenderer extends DataRenderer {
float arcStartPointX = 0.f, arcStartPointY = 0.f;
- if (sweepAngleOuter % 360f < 0.00001f) {
+ if (sweepAngleOuter % 360f < Utils.FLOAT_EPSILON) {
// Android is doing "mod 360"
mPathBuffer.addCircle(center.x, center.y, radius, Path.Direction.CW);
} else {
@@ -771,7 +771,7 @@ public class PieChartRenderer extends DataRenderer {
int visibleAngleCount = 0;
for (int j = 0; j < entryCount; j++) {
// draw only if the value is greater than zero
- if ((Math.abs(set.getEntryForIndex(j).getY()) > 0.000001)) {
+ if ((Math.abs(set.getEntryForIndex(j).getY()) > Utils.FLOAT_EPSILON)) {
visibleAngleCount++;
}
}
@@ -958,7 +958,7 @@ public class PieChartRenderer extends DataRenderer {
Entry e = dataSet.getEntryForIndex(j);
// draw only if the value is greater than zero
- if ((Math.abs(e.getY()) > 0.000001)) {
+ if ((Math.abs(e.getY()) > Utils.FLOAT_EPSILON)) {
float x = (float) ((r - circleRadius)
* Math.cos(Math.toRadians((angle + sliceAngle)