Skip to content

Commit 0027ff5

Browse files
authored
[Chore] Round order of magnitude at 9 hundredths instead of tenths (alexjustesen#1217)
1 parent 4319d85 commit 0027ff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/Helpers/Number.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ public static function bitsToHuman(int|float $bits, int $precision = 0, ?int $ma
3535
{
3636
$units = ['B', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb'];
3737

38-
for ($i = 0; ($bits / 1000) > 0.9 && ($i < count($units) - 1); $i++) {
38+
for ($i = 0; ($bits / 1000) > 0.99 && ($i < count($units) - 1); $i++) {
3939
$bits /= 1000;
4040
}
4141

@@ -51,7 +51,7 @@ public static function toBitRate(int|float $bits, int $precision = 0, ?int $maxP
5151
{
5252
$units = ['Bps', 'Kbps', 'Mbps', 'Gbps', 'Tbps', 'Pbps', 'Ebps', 'Zbps', 'Ybps'];
5353

54-
for ($i = 0; ($bits / 1000) > 0.9 && ($i < count($units) - 1); $i++) {
54+
for ($i = 0; ($bits / 1000) > 0.99 && ($i < count($units) - 1); $i++) {
5555
$bits /= 1000;
5656
}
5757

0 commit comments

Comments
 (0)