Sorry. I swapped the ends around when posting. That should [901,0], but the point still stands:
$some_pos = 950;
print +( $_->[1] < $_->[0] and $_->[1] >= $some_pos )
? 'contained'
: 'not contained' for [901,0];;
not contained
A range of 100 starting at 901 will wrap around to end at position 0, thereby covering position 950; but your test fails to detect it.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
|