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 authored and pmairoldi committed Sep 22, 2016
1 parent f70c28e commit be7a7fb
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 be7a7fb

Please sign in to comment.