On 28/2/03 4:38 pm, Rick Measham at [EMAIL PROTECTED] spake thus:
> sub floor($) {
> return 0 unless $_[0]*1 == $_[0]; # This might not be the best way :)
> return int($_[0]) if $_[0] >= 0;
> return int($_[0]) -1;
> }
Better:
sub mfloor($) {
return 0 unless $_[0]*1 != 0;
return int($_[0]) if (($_[0] >= 0) || (int($_[0]) == $_[0]));
return int($_[0]) -1;
}
--------------------------------------------------------
�� � � � � � There are 10 kinds of people:
�� those that understand binary, and those that don't.
--------------------------------------------------------
�� The day Microsoft makes something that doesn't suck
�� � is the day they start selling vacuum cleaners
--------------------------------------------------------