You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My app keeps crashing with the error " fatal error: Double value cannot be converted to Int because it is either infinite or NaN." The crash happens in the return line of the function below, found in ChartUtils. It's for a bar chart if it makes any difference! Any thoughts?
internal class func decimals(_ number: Double) -> Int
{
if number == 0.0
{
return 0
}
let i = roundToNextSignificant(number: Double(number))
return Int(ceil(-log10(i))) + 2
}
The text was updated successfully, but these errors were encountered:
My app keeps crashing with the error " fatal error: Double value cannot be converted to Int because it is either infinite or NaN." The crash happens in the return line of the function below, found in ChartUtils. It's for a bar chart if it makes any difference! Any thoughts?
internal class func decimals(_ number: Double) -> Int
{
if number == 0.0
{
return 0
}
The text was updated successfully, but these errors were encountered: