jersmi's picture

Is this a bug? I have a Limit to Range set to wrap min = 1, max = 3. Shouldn't a value input of 4 output 1? Right now it's outputting 2.

Comments

Since you are using real

MartinusMagneson's picture
Submitted by

Since you are using real numbers you are basically making 1.0 = 3.0. Any decimal above 3.0 will wrap around and add itself to 1.0 meaning that if you add 0.1 to 3 you end up with 1.1. What you are left with are two steps from 1 -> 2 and 2 -> 3. This means that 0.0 = 2.0 + 1.0 = 1.0 +1.0 = 2.0 + 1.0 = 1.0 + 1.0 = 2.0. So when limiting to ranges when using real numbers, you'll have to think in terms of the amount of steps instead of the amount of numbers.

This however changes if you change the input ports to use integers (right click on port, revert to generic, select integer). Since there aren't any decimals, 0 = 3 (one less than 1), with the same range it would look like this: 0 (3) + 1 = 1 + 1 = 2 + 1 = 3 + 1 = 1.