Pd offers a 'div' which should perhaps have been named 'floor'. It does 'correct' integer division so that Y = X * div(Y,X) + mod(Y,X).
cheers Miller
On Sat, Nov 27, 2004 at 01:56:18PM -0500, Mathieu Bouchard wrote:
On Sat, 27 Nov 2004, Frank Barknecht wrote:
(caveat: ideally, % and int would be replaced by mod and floor, but the latter aren't in pd afaik)
"mod" is, AFAIK.
But there is no trivial way to make a flooring division, which is the complementary operation of mod.
The basic pattern of decomposing X into An+B where A,B are integers and B is taken from a finite set, is typically done in two ways, one being done with % and / and int, and the other being done with mod and / and floor. But floor is missing. If you use mod with int then you are getting results not consistent with the usual X=An+B assumption, which is not nice.
Or is floor available under another name?
Mathieu Bouchard -=- Montréal QC Canada -=- http://artengine.ca/matju
PD-list@iem.at mailing list UNSUBSCRIBE and account-management -> http://iem.at/cgi-bin/mailman/listinfo/pd-list