Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision fe0f6f38

Von Udo Spallek vor mehr als 19 Jahren hinzugefügt

  • ID fe0f6f38468da0d737079034f0174c59d526d32c
  • Vorgänger f43900dd
  • Nachfolger 7247d23a

Änderungen bez. sub round_amound von heute Morgen wieder herausgenommen, weil nonfunktional. Das problem scheint woanders zu liegen.

Unterschiede anzeigen:

SL/Form.pm
# Descr. http://de.wikipedia.org/wiki/Rundung
# Inspired by
# http://www.perl.com/doc/FAQs/FAQ/oldfaq-html/Q4.13.html
# Solves Bug: 189
# Version 1.0 try to solve Bug: 189
# Udo Spallek
$amount = $amount * (10 ** ($places));
$round_amount = int($amount + .5 * ($amount <=> 0))/(10**($places));
while ($places > 0 && $round_amount=~ /\./){
$round_amount =~ s/[0]$//g;
$places--;
} ;
#$round_amount =~ s/\.$//g;
$main::lxdebug->leave_sub();
return $round_amount;

Auch abrufbar als: Unified diff