[PD] [newbie] rounding

aym3ric stm-sq at bleu255.com
Tue Feb 10 00:01:40 CET 2004

AW> I need to round down a float. Right now the value (which is timer actually)
AW> is something like 24.4648736
AW> I need it to be 24.5 in this case.

dunno if there's a round external somewhere but you could subtract a
float number from its integer equivalent with [int ] then use [moses ]
to determine when you should keep the original or increment with 0.1

no time right now to make you the patch, but this should not be too
hard using those 2 objects and some operators.



More information about the Pd-list mailing list