(x, y, minX, minY, invSize)
| 5820 | |
| 5821 | // z-order of a point given coords and inverse of the longer side of data bbox |
| 5822 | function zOrder(x, y, minX, minY, invSize) { |
| 5823 | // coords are transformed into non-negative 15-bit integer range |
| 5824 | x = 32767 * (x - minX) * invSize; |
| 5825 | y = 32767 * (y - minY) * invSize; |
| 5826 | |
| 5827 | x = (x | (x << 8)) & 0x00FF00FF; |
| 5828 | x = (x | (x << 4)) & 0x0F0F0F0F; |
| 5829 | x = (x | (x << 2)) & 0x33333333; |
| 5830 | x = (x | (x << 1)) & 0x55555555; |
| 5831 | |
| 5832 | y = (y | (y << 8)) & 0x00FF00FF; |
| 5833 | y = (y | (y << 4)) & 0x0F0F0F0F; |
| 5834 | y = (y | (y << 2)) & 0x33333333; |
| 5835 | y = (y | (y << 1)) & 0x55555555; |
| 5836 | |
| 5837 | return x | (y << 1); |
| 5838 | } |
| 5839 | |
| 5840 | // find the leftmost node of a polygon ring |
| 5841 | function getLeftmost(start) { |
no outgoing calls
no test coverage detected