[range A B C D] and [maxlib/scale A B C D] don't behave correctly when either A>B or C>D or both.
If they are not supposed to (which I don't see a good reason why), then they should at the very least print an error message, rather than output any unpredictable value.
When only C>D but A<B, the output seems to range from C to max(D,1) instead of from C to D.
When A>B, the result doesn't make any sense.
By the way wouldn' it be better to implement these objects as abstractions?
Anonymous
"When only C>D but A<B, the output seems to range from C to max(D,1) instead of from C to D."
No, it's a bit more perverse than that. When A<B and D=0 (regardless of the value of C), the output ranges from C to 1 instead of from C to 0. For any other value of D (provided that A<B) it behaves correctly.
So [range A B C D] doesn't behave correctly when any of the following hold:
1) A>B => garbage output
2) D=0 => behaves as if D=1
Any news in this regard?
It's a shame such a useful object doesn't work at its full potential