[PD] is there a [round]?

Frank Barknecht fbar at footils.org
Wed Oct 12 10:00:39 CEST 2005


Hallo,
Frank Barknecht hat gesagt: // Frank Barknecht wrote:

> Hallo,
> Mathieu Bouchard hat gesagt: // Mathieu Bouchard wrote:
> 
> > Note to other people: we know [i] is similar to what James wants, but it's
> > not similar enough.
> 
> I can't really follow: What's wrong with
> 
>   [+/- 0.5]
>   |
>   [int]
> 
> as in attached patch which doesn't need any externals at all?

Forgot to say; The only difference to a round as in C was the handling
of halfway cases smaller than 0, so if that is important to you, the
abstraction gets a little bit more complicated, as in attached new
version, which rounds away from zero even in sub-zero halfway cases.

Ciao
-- 
 Frank Barknecht                 _ ______footils.org_ __goto10.org__
-------------- next part --------------
#N canvas 0 0 450 300 10;
#X obj 167 171 int;
#X floatatom 167 241 5 0 0 0 - - -;
#X floatatom 167 50 5 0 0 0 - - -;
#X obj 211 189 int;
#X obj 167 86 moses 0;
#X obj 211 160 + 0.5;
#X obj 167 120 * -1;
#X obj 167 193 * -1;
#X obj 167 145 + 0.5;
#X connect 0 0 7 0;
#X connect 2 0 4 0;
#X connect 3 0 1 0;
#X connect 4 0 6 0;
#X connect 4 1 5 0;
#X connect 5 0 3 0;
#X connect 6 0 8 0;
#X connect 7 0 1 0;
#X connect 8 0 0 0;


More information about the Pd-list mailing list