summaryrefslogtreecommitdiffstats
path: root/MDK/Common/Math.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-13 14:40:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-13 14:40:56 +0000
commit602848d7fba65f080b8a5a3f46b881b48320e4f5 (patch)
tree618368bc5473795b0616a0d46f21274744fe13ba /MDK/Common/Math.pm
parent3cfc42b677f1599e57e63ae189f5d39d1e5d8f5e (diff)
downloadperl-MDK-Common-602848d7fba65f080b8a5a3f46b881b48320e4f5.tar
perl-MDK-Common-602848d7fba65f080b8a5a3f46b881b48320e4f5.tar.gz
perl-MDK-Common-602848d7fba65f080b8a5a3f46b881b48320e4f5.tar.bz2
perl-MDK-Common-602848d7fba65f080b8a5a3f46b881b48320e4f5.tar.xz
perl-MDK-Common-602848d7fba65f080b8a5a3f46b881b48320e4f5.zip
add/remove spaces to make perl_checker happy
Diffstat (limited to 'MDK/Common/Math.pm')
-rw-r--r--MDK/Common/Math.pm12
1 files changed, 6 insertions, 6 deletions
diff --git a/MDK/Common/Math.pm b/MDK/Common/Math.pm
index faf700e..a261433 100644
--- a/MDK/Common/Math.pm
+++ b/MDK/Common/Math.pm
@@ -125,15 +125,15 @@ sub even { $_[0] % 2 == 0 }
sub odd { $_[0] % 2 == 1 }
sub sqr { $_[0] * $_[0] }
sub sign { $_[0] <=> 0 }
-sub round { int ($_[0] + 0.5) }
+sub round { int($_[0] + 0.5) }
sub round_up { my ($i, $r) = @_; $i = int $i; $i += $r - ($i + $r - 1) % $r - 1 }
sub round_down { my ($i, $r) = @_; $i = int $i; $i -= $i % $r }
sub divide { my $d = int $_[0] / $_[1]; wantarray ? ($d, $_[0] % $_[1]) : $d }
-sub min { my $n = shift; $_ < $n and $n = $_ foreach @_; $n }
-sub max { my $n = shift; $_ > $n and $n = $_ foreach @_; $n }
-sub or_ { my $n = 0; $n ||= $_ foreach @_; $n }
-sub and_{ my $n = 1; $n &&= $_ foreach @_; $n }
-sub sum { my $n = 0; $n += $_ foreach @_; $n }
+sub min { my $n = shift; $_ < $n and $n = $_ foreach @_; $n }
+sub max { my $n = shift; $_ > $n and $n = $_ foreach @_; $n }
+sub or_ { my $n = 0; $n ||= $_ foreach @_; $n }
+sub and_ { my $n = 1; $n &&= $_ foreach @_; $n }
+sub sum { my $n = 0; $n += $_ foreach @_; $n }
sub product { my $n = 1; $n *= $_ foreach @_; $n }