floats and rounding errors?

Jun 2, 2009 at 2:13am

floats and rounding errors?

so, i’m using [scale] with a incoming range of 0.92 – 1.08

i would like to map the outgoing range to 0 – 6.

the problem is that the outgoing range never seems to hit all the integers, i would like the possibility of the ouptut hitting exactly 0,1,2,3,4,5,6 along the way.

The closest it gets to (according to print window) are:

0.000000 – good
1.000001 – bad
2.000000 – good
2.999999 – bad
3.999998 – bad
5.000001 – bad
6.000000 – good

how can i get max to hit the integers along the way?

#44205
Jun 2, 2009 at 2:56am
jimdrake wrote on Tue, 02 June 2009 04:13
how can i get max to hit the integers along the way?

How about using round?

#158900

You must be logged in to reply to this topic.