From d89b5b1bd44f99e92b7d0faed2fe3d0ddc475620 Mon Sep 17 00:00:00 2001 From: Alex Justesen Date: Thu, 22 Feb 2024 09:05:34 -0500 Subject: [PATCH] round order of magnitude at .99 --- app/Helpers/Number.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Helpers/Number.php b/app/Helpers/Number.php index 02ad387a1..4ad6fc51e 100644 --- a/app/Helpers/Number.php +++ b/app/Helpers/Number.php @@ -35,7 +35,7 @@ public static function bitsToHuman(int|float $bits, int $precision = 0, ?int $ma { $units = ['B', 'Kb', 'Mb', 'Gb', 'Tb', 'Pb', 'Eb', 'Zb', 'Yb']; - for ($i = 0; ($bits / 1000) > 0.9 && ($i < count($units) - 1); $i++) { + for ($i = 0; ($bits / 1000) > 0.99 && ($i < count($units) - 1); $i++) { $bits /= 1000; } @@ -51,7 +51,7 @@ public static function toBitRate(int|float $bits, int $precision = 0, ?int $maxP { $units = ['Bps', 'Kbps', 'Mbps', 'Gbps', 'Tbps', 'Pbps', 'Ebps', 'Zbps', 'Ybps']; - for ($i = 0; ($bits / 1000) > 0.9 && ($i < count($units) - 1); $i++) { + for ($i = 0; ($bits / 1000) > 0.99 && ($i < count($units) - 1); $i++) { $bits /= 1000; }