[PD] nearest power of 2
Thomas Grill
gr at grrrr.org
Thu Dec 11 20:08:45 CET 2008
Hi,
one could also use
expr pow(2, int(log($f1)/log(2)+0.5))
which takes the dual log, rounds that to the nearest integer and
calculates the dual power again.
gr~~~
Am 11.12.2008 um 18:02 schrieb hard off:
> ah don't worry. the bitwise operators in pd correspond exactly to
> the process in that wikipedia article. couldn't guess it would be
> that easy.
>
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
More information about the Pd-list
mailing list