Changeset 51 for branches/old/stat_functions.php
- Timestamp:
- Feb 20, 2015, 9:21:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/old/stat_functions.php
r49 r51 24 24 function TruncateDigits($Value, $Digits = 4) 25 25 { 26 for($II = 2; $II > - 1; $II--)26 for($II = 2; $II > -6; $II--) 27 27 { 28 28 if($Value >= pow(10, $II)) 29 29 { 30 if($Digits < ($II + 1)) $RealDigits = $II + 1; else $RealDigits = $Digits; 30 if($Digits < ($II + 1)) $RealDigits = $II + 1; 31 else $RealDigits = $Digits; 31 32 $Value = round($Value / pow(10, $II - $RealDigits + 1)) * pow(10, $II - $RealDigits + 1); 32 33 break;
Note:
See TracChangeset
for help on using the changeset viewer.