Returns a tuple representing the sector for the given `position`. Parameters ---------- position : tuple of len 3 Returns ------- sector : tuple of len 3
(position)
| 110 | |
| 111 | |
| 112 | def sectorize(position): |
| 113 | """ Returns a tuple representing the sector for the given `position`. |
| 114 | |
| 115 | Parameters |
| 116 | ---------- |
| 117 | position : tuple of len 3 |
| 118 | |
| 119 | Returns |
| 120 | ------- |
| 121 | sector : tuple of len 3 |
| 122 | |
| 123 | """ |
| 124 | x, y, z = normalize(position) |
| 125 | x, y, z = x // SECTOR_SIZE, y // SECTOR_SIZE, z // SECTOR_SIZE |
| 126 | return (x, 0, z) |
| 127 | |
| 128 | |
| 129 | class Model(object): |
no test coverage detected