in reply to Re^2: Generating Visually Distinct Colors
in thread Generating Visually Distinct Colors

In Perl 5, ceil is in package POSIX and it is (together with floor) the recommended way to do a unilateral round towards an integer. For what I can remember, the use of int for this is discouraged even in Perl (5) documentation, due to the fact that its behaviour is not consistent between positive and negative numbers (it only cuts decimals away).

I don't know if this has been changed in Perl 6, but I think that I'll stick to the library ceil anyway.

Flavio

-- Don't fool yourself.

Replies are listed 'Best First'.
Re^4: Generating Visually Distinct Colors
by japhy (Canon) on Mar 22, 2005 at 21:06 UTC
    Yes, I use ceil(), I was commenting on the very bizarre P6 ceil-equivalent.
    _____________________________________________________
    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart