From a1c1dd1bf6d0802afeed69a04ecafb57c8e88671 Mon Sep 17 00:00:00 2001 From: Banana Date: Thu, 26 Apr 2012 11:24:59 +0200 Subject: [PATCH] new function --- single-functions/formating-bytes.php | 45 ++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 single-functions/formating-bytes.php diff --git a/single-functions/formating-bytes.php b/single-functions/formating-bytes.php new file mode 100644 index 0000000..3ada150 --- /dev/null +++ b/single-functions/formating-bytes.php @@ -0,0 +1,45 @@ + $powerBase && $power < $powerMax) { + $power++; + $amount /= $powerBase; + } + + return round($amount, $decimals) . ' ' . $prefixes[$power] . $unit; +} + +?> \ No newline at end of file -- 2.39.5