Skip to content

Commit

Permalink
Fix spacing in units
Browse files Browse the repository at this point in the history
  • Loading branch information
aravind-raveendran committed Aug 20, 2024
1 parent 7d28ff4 commit 86d4068
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,11 @@ private extension StatsInfoViewModel {

static func formatBitRate(bitRate: Double) -> String {
if bitRate < KILOBITS {
"\(bitRate)bps"
"\(bitRate) bps"
} else if bitRate >= KILOBITS && bitRate < MEGABITS {
"\((bitRate / KILOBITS).rounded(toPlaces: 4))Kbps"
"\((bitRate / KILOBITS).rounded(toPlaces: 4)) Kbps"
} else {
"\((bitRate / MEGABITS).rounded(toPlaces: 4))Mbps"
"\((bitRate / MEGABITS).rounded(toPlaces: 4)) Mbps"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -435,11 +435,11 @@ private extension StatisticsViewModel {

static func formatBitRate(bitRate: Double) -> String {
if bitRate < KILOBITS {
"\(bitRate)bps"
"\(bitRate) bps"
} else if bitRate >= KILOBITS && bitRate < MEGABITS {
"\((bitRate / KILOBITS).rounded(toPlaces: 4))Kbps"
"\((bitRate / KILOBITS).rounded(toPlaces: 4)) Kbps"
} else {
"\((bitRate / MEGABITS).rounded(toPlaces: 4))Mbps"
"\((bitRate / MEGABITS).rounded(toPlaces: 4)) Mbps"
}
}

Expand Down

0 comments on commit 86d4068

Please sign in to comment.