[PD] even/odd conditional mod

Chuckk Hubbard badmuthahubbard at gmail.com
Thu Aug 3 00:18:16 CEST 2006


On 8/2/06, Frank Barknecht <fbar at footils.org> wrote:
> Hallo,
> Christian Klippel hat gesagt: // Christian Klippel wrote:
>
> > if pd provides the bitwise and operator, you may simply check the number for
> > its lowest bit ( & 0x01 )... if set, its uneven, if clear, its an even
> > number. this works only on integers of course.
>
> This is a good idea. THe object to use is [& 1] as in attached patch.

Is this more efficient?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mymod.pd
Type: application/octet-stream
Size: 419 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20060802/e2bd0b74/attachment.obj>


More information about the Pd-list mailing list