diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-24 13:33:18 -0400 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-04-24 13:33:18 -0400 |
commit | 06c5aca2a1f19a0ecf48f2c0c71e3329219375fc (patch) | |
tree | 6a9172d62ba7d03bd3771407c5537b7d45e2db46 | |
parent | 5bf0a389786362aaafa6ddd70ed03808528e58bd (diff) | |
download | phoronix-test-suite-upstream-06c5aca2a1f19a0ecf48f2c0c71e3329219375fc.tar.gz phoronix-test-suite-upstream-06c5aca2a1f19a0ecf48f2c0c71e3329219375fc.tar.xz phoronix-test-suite-upstream-06c5aca2a1f19a0ecf48f2c0c71e3329219375fc.zip |
A fix for showing decimal points when number divides cleanly
-rw-r--r-- | pts-core/functions/pts-functions.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pts-core/functions/pts-functions.php b/pts-core/functions/pts-functions.php index 40d2c2d..f508573 100644 --- a/pts-core/functions/pts-functions.php +++ b/pts-core/functions/pts-functions.php @@ -352,7 +352,10 @@ function pts_trim_double($double, $accuracy = 2) $return = explode(".", $double); - if(count($return) > 1) + if(count($return) == 1) + $return[1] = "00"; + + if(count($return) == 2) { $strlen = strlen($return[1]); |