| 29 | } |
| 30 | |
| 31 | Vec2I CelestialDatabase::chunkIndexFor(CelestialCoordinate const& coordinate) const { |
| 32 | return chunkIndexFor(coordinate.location().vec2()); |
| 33 | } |
| 34 | |
| 35 | Vec2I CelestialDatabase::chunkIndexFor(Vec2I const& systemXY) const { |
| 36 | return {(systemXY[0] - pmod(systemXY[0], m_baseInformation.chunkSize)) / m_baseInformation.chunkSize, |