TIMTOWTDI!sub stround { my( $number, $decimals ) = @_; substr( $number + ( '0.' . '0' x $decimals . '5' ), 0, $decimals + + length(int($number)) + 1 ); }
In reply to Re: How do I print/round a number to a given number of decimal places?
by wrvhage
in thread How do I print/round a number to a given number of decimal places?
by vroom
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |