Skip to content

Commit

Permalink
Safeguard for nan/inf (Closes #1511)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgindi committed Sep 21, 2016
1 parent 4efcc71 commit 4f55e0e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Charts/Utils/ChartUtils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ open class ChartUtils

internal class func decimals(_ number: Double) -> Int
{
if number == 0.0
if number.isNaN || number.isInfinite || number == 0.0
{
return 0
}
Expand Down

0 comments on commit 4f55e0e

Please sign in to comment.