Skip to content

Commit

Permalink
Use EPSILON instead of an arbitrary value (Fixes #1239)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Aug 14, 2016
1 parent 23af036 commit d723224
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Charts/Classes/Renderers/PieChartRenderer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public class PieChartRenderer: DataRenderer
for j in 0 ..< entryCount
{
guard let e = dataSet.entryForIndex(j) else { continue }
if ((abs(e.y) > 0.000001))
if ((abs(e.y) > DBL_EPSILON))
{
visibleAngleCount += 1
}
Expand All @@ -147,7 +147,7 @@ public class PieChartRenderer: DataRenderer
guard let e = dataSet.entryForIndex(j) else { continue }

// draw only if the value is greater than zero
if (abs(e.y) > 0.000001)
if (abs(e.y) > DBL_EPSILON)
{
if !chart.needsHighlight(index: j)
{
Expand Down Expand Up @@ -703,7 +703,7 @@ public class PieChartRenderer: DataRenderer
for j in 0 ..< entryCount
{
guard let e = set.entryForIndex(j) else { continue }
if ((abs(e.y) > 0.000001))
if ((abs(e.y) > DBL_EPSILON))
{
visibleAngleCount += 1
}
Expand Down

0 comments on commit d723224

Please sign in to comment.