Re: [Vala] Patch to include fabs, abs, MAX and MIN



* Mario Carrión <mario carrion gmail com> wrote:
However, what do you think about using max and min methods with
different signatures, let say:

A nifty hack would be to use a template for it that would force it to
cast it to an integer internally:

        a = min<int>(b, c);

Problem with that, is that templates are only applicable to objects, not
primitive datatypes.

-- 
 Ed Schouten <ed fxq nl>
 WWW: http://g-rave.nl/

Attachment: pgpXjiqtXvwYB.pgp
Description: PGP signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]