remove WebGUI::Utility::round

This commit is contained in:
Graham Knop 2010-08-24 16:45:38 -05:00
parent ddf0419836
commit fadc4f34ea
13 changed files with 34 additions and 87 deletions

View file

@ -23,7 +23,7 @@ use Net::CIDR::Lite;
our @ISA = qw(Exporter);
our @EXPORT = qw(
&sortHash &isIn &round
&sortHash &isIn
);
@ -39,7 +39,6 @@ This package provides miscellaneous but useful utilities to the WebGUI programme
use WebGUI::Utility;
$boolean = isIn($value, @array);
$rounded = round($number, $digits);
%hash = sortHash(%hash);
=head1 METHODS
@ -72,29 +71,6 @@ sub isIn {
#-------------------------------------------------------------------
=head2 round ( float [, significantDigits ] )
Returns an integer after rounding a floating point number.
=head3 float
Any floating point number.
=head3 significantDigits
The number of digits to leave after the decimal point. Defaults to 0.
B<NOTE:> If you set this higher than 0 then you'll get back another floating point number rather than an integer.
=cut
sub round {
my $significantDigits = $_[1] || 0;
return sprintf(('%.'.$significantDigits.'f'), $_[0]);
}
#-------------------------------------------------------------------
=head2 sortHash ( hash )
Sorts a hash by its values. Returns a Tie::IxHash. You must assign this to