Skip to content

Commit

Permalink
Fix bug with formatting zero values
Browse files Browse the repository at this point in the history
  • Loading branch information
marcingajda committed Apr 18, 2020
1 parent 5cf17cb commit 6996081
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Covid-19 Status/src/Statistics/StatsFormatter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ extension Double {
if self.isInfinite {
return "\(self < 0.0 ? "-" : "+")Infinity"
}
if self == 0 {
return "0"
}

let units = ["", "k", "M", "B"]
var value = self
Expand Down

0 comments on commit 6996081

Please sign in to comment.