On Mon, 2007-01-15 at 05:51 +0000, Claude Heiland-Allen wrote:
Roman Haefeli wrote:
On Sun, 2007-01-14 at 15:01 +0000, Claude Heiland-Allen wrote:
When writing it I found a bug in wrap~ in pd-0.40-2 from Miller's site:
sig~ 1 wrap~ print~ -> 0
as i would expect.
sig~ 0 wrap~ print~ -> 1
as i would expect, as well. where is the bug? am i missing something?
wrap~-help says:
----8<---- wrap~ gives the difference between the input and the largest integer not exceeding it (for positive numbers this is the fractional part). ----8<----
largest integer not exceeding 0 is 0, or?
largest integer not exceeding X is X when X is an integer, or?
exactly, and since [wrap~] gives you the difference between the largest integer not exceeding X and X, it will always give you 0, when X is an integer. the output of [wrap~] is always => 0 and < 1.
it makes life simpler when
(x - (wrap~ x)) == x
when x is an integer, as there is no [int~] in Pd.
i can't quite follow, what you mean hear. you CAN use [wrap~] to build your own [int~] (see attached patch).
roman