Rick Measham <[EMAIL PROTECTED]> writes: > > Better: > sub mfloor($) { > return 0 unless $_[0]*1 != 0; > return int($_[0]) if (($_[0] >= 0) || (int($_[0]) == $_[0])); > return int($_[0]) -1; > }
sub floor { my $x = $_[0]; my $ix = int $x; $ix <= $x ? $ix : $ix - 1; } Peter -- Peter J. Acklam - [EMAIL PROTECTED] - http://home.online.no/~pjacklam