Ignore:
Timestamp:
Feb 20, 2015, 9:21:01 AM (10 years ago)
Author:
chronos
Message:
  • Modify: If measure not found then use default one.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/old/stat_functions.php

    r49 r51  
    2424function TruncateDigits($Value, $Digits = 4)
    2525{
    26   for($II = 2; $II > -1; $II--)
     26  for($II = 2; $II > -6; $II--)
    2727  {
    2828    if($Value >= pow(10, $II))
    2929    {
    30       if($Digits < ($II + 1)) $RealDigits = $II + 1; else $RealDigits = $Digits;
     30      if($Digits < ($II + 1)) $RealDigits = $II + 1;
     31        else $RealDigits = $Digits;
    3132      $Value = round($Value / pow(10, $II - $RealDigits + 1)) * pow(10, $II - $RealDigits + 1);
    3233      break;
Note: See TracChangeset for help on using the changeset viewer.