Accepts `position` of arbitrary precision and returns the block containing that position. Parameters ---------- position : tuple of len 3 Returns ------- block_position : tuple of ints of len 3
(position)
| 92 | |
| 93 | |
| 94 | def normalize(position): |
| 95 | """ Accepts `position` of arbitrary precision and returns the block |
| 96 | containing that position. |
| 97 | |
| 98 | Parameters |
| 99 | ---------- |
| 100 | position : tuple of len 3 |
| 101 | |
| 102 | Returns |
| 103 | ------- |
| 104 | block_position : tuple of ints of len 3 |
| 105 | |
| 106 | """ |
| 107 | x, y, z = position |
| 108 | x, y, z = (int(round(x)), int(round(y)), int(round(z))) |
| 109 | return (x, y, z) |
| 110 | |
| 111 | |
| 112 | def sectorize(position): |