Limit to Range "wrap" mode outputs a different range of values depending on what range the input value is in

Steps causing the bug to occur

  1. Run included composition, and have a look at the console window.
  2. (This step is optional!) Stop the composition and run it again with different values specified for maximum and minimum (green nodes) and switch between integers and real numbers (orange node, 1 for integer, 2 for real). Change the ‘b’ value in the yellow node if the composition should count to a different value.

All ranges below include the start and end values. So a range between 1 and 5 includes the numbers 1, 2, 3, 4 and 5.

  • When the input value is less than the minimum, the output range is between minimum+1 and maximum.
  • When between the minimum and maximum, the output range is between minimum and maximum.
  • When greater than the maximum, the output range is between minimum and maximum-1.

How did the result differ from what you expected?

The output range should be consistent through the entire range of possible input values. Whether the output range should be between minimum and maximum, or minimum and maximum-1, is up to the development team of course. As a programmer, the latter makes sense to me, but the prior seems more consistent with other Vuo nodes.

Other notes

  • Vuo version: 0.5.3
  • macOS version: OS X 10.9

LimitToRange.vuo (3.98 KB)

Thanks for the report, @pianomatic. This is fixed in Vuo 0.5.5.