[PD] division with remainder

IOhannes m zmoelnig zmoelnig at iem.at
Mon May 15 13:18:28 CEST 2006

Hans-Christoph Steiner wrote:

> I think that [mod] should probably do whatever ANSI C or ISO math stuff 
> does, which I think it currently is doing.  Most programming languages 
> follow these conventions, so its a good idea for Pd to as well.
> But the object you propose does sound handy, so maybe it should be a 
> separate object, like [floatmod].

it sounds so handy that there are even implementations for it:
the built-in [wrap~] is kind of a [floatmod 1]

based on that name, there is a [wrap] in zexy which does the same for 
floats _and_ which has a settable range to be wrapped into, e.g [wrap 2] 
should return 0.45 when it receives "2.45".

i am pretty sure this object could also be built with standard objects.


More information about the Pd-list mailing list