This is no problem
All you have to do is be careful how you define your min and max longitude. If an area starts at longitude 350 and is 20 clicks wide going to 10, then your minimum longitude is 350 and max is 10. The same algorithm works that either I and BrowserUk provided
If your data is defined so that it gives you a range of 350-370, then all you need to is take modulus 360 of your data ($max = $max % 360). Same thing is true if it's -10 to 20 ($min = $min % 360).
There's no reason to touch latitudes, as they won't ever be outside of the -90 to 90 range.
In reply to Re^3: Permutation and comparison loop
by wind
in thread Permutation and comparison loop
by spacegeologist
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |