[PD] [newbie] rounding
vanDongen/Gilcher
gml at xs4all.nl
Tue Feb 10 00:24:36 CET 2004
[int] will round down to integer, that is it cuts of all decimals.
To do rounding of a (positive) float to a decimal place:
for instance to 2 decimals behind the komma:
[* 100]
|
[+ 0.5] ; that is to round properly instead of just cutting the decimals
|
[int]
|
[/ 100]
gr
Gerard
On Monday 09 February 2004 21:58, Anton Woldhek wrote:
> Hi everybody,
>
> I was pretty active with PD for a while, but got kinda side-tracked
> unfortunatly.
> Anyways, if somebody could be so kind to help me back in the saddle.
> I need to round down a float. Right now the value (which is timer actually)
> is something like 24.4648736
> I need it to be 24.5 in this case. I couldnt find an object to do this. But
> im sure ive missed something,
> as i know ive done this before.
>
> thanks for the help
> Anton
>
>
> _______________________________________________
> PD-list mailing list
> PD-list at iem.at
> http://iem.at/cgi-bin/mailman/listinfo/pd-list
--
electronic & acoustic musics-- http://www.xs4all.nl/~gml
More information about the Pd-list
mailing list