(x, y, minX, minY, invSize)
| 69744 | |
| 69745 | // z-order of a point given coords and inverse of the longer side of data bbox |
| 69746 | function zOrder(x, y, minX, minY, invSize) { |
| 69747 | // coords are transformed into non-negative 15-bit integer range |
| 69748 | x = 32767 * (x - minX) * invSize; |
| 69749 | y = 32767 * (y - minY) * invSize; |
| 69750 | |
| 69751 | x = (x | (x << 8)) & 0x00FF00FF; |
| 69752 | x = (x | (x << 4)) & 0x0F0F0F0F; |
| 69753 | x = (x | (x << 2)) & 0x33333333; |
| 69754 | x = (x | (x << 1)) & 0x55555555; |
| 69755 | |
| 69756 | y = (y | (y << 8)) & 0x00FF00FF; |
| 69757 | y = (y | (y << 4)) & 0x0F0F0F0F; |
| 69758 | y = (y | (y << 2)) & 0x33333333; |
| 69759 | y = (y | (y << 1)) & 0x55555555; |
| 69760 | |
| 69761 | return x | (y << 1); |
| 69762 | } |
| 69763 | |
| 69764 | // find the leftmost node of a polygon ring |
| 69765 | function getLeftmost(start) { |
no outgoing calls
no test coverage detected