james tittle schrieb:
heya,
...looking for a pd object or abstraction that'll round a float up/ down...
james
I use my round to have a defined number of comma digits. 0.12345 --> round 2 --> 0.12 (default is 0)
marius.
#N canvas 25 60 441 377 10; #X msg 194 116 10; #X obj 194 93 loadbang; #X obj 194 138 pow $1; #X obj 79 98 * 1; #X obj 79 23 inlet; #X obj 155 168 / 1; #X msg 155 146 1; #X obj 116 146 + 0.5; #X obj 79 180 div; #X obj 79 227 outlet; #X obj 79 203 * 1; #X obj 79 121 moses 0; #X obj 79 146 - 0.5; #X obj 268 24 inlet; #X text 41 297 rounds to a certain amount of digits after the comma ; #X text 32 267 USE: arg for number of commadigits default = 0; #X obj 268 55 runden; #X text 41 309 0.123456 --> runden 2 --> 0.12; #X text 41 319 0.123456 --> runden 4 --> 0.1235; #X connect 0 0 2 0; #X connect 1 0 0 0; #X connect 2 0 3 1; #X connect 2 0 5 1; #X connect 2 0 6 0; #X connect 3 0 11 0; #X connect 4 0 3 0; #X connect 5 0 10 1; #X connect 6 0 5 0; #X connect 7 0 8 0; #X connect 8 0 10 0; #X connect 10 0 9 0; #X connect 11 0 12 0; #X connect 11 1 7 0; #X connect 12 0 8 0; #X connect 13 0 16 0; #X connect 16 0 2 1;