Skip to content

Commit

Permalink
Added a check against NaN
Browse files Browse the repository at this point in the history
There needs to be a check against NaN after
ChartUtils::roundToNextSignificant() returns.
  • Loading branch information
Shad committed Oct 27, 2016
1 parent 8ef870a commit f48d76f
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 @@ -51,7 +51,7 @@ open class ChartUtils

let i = roundToNextSignificant(number: Double(number))

if i.isInfinite
if i.isInfinite || i.isNaN
{
return 0
}
Expand Down

0 comments on commit f48d76f

Please sign in to comment.