MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / chunkIndexFor

Method chunkIndexFor

source/game/StarCelestialDatabase.cpp:31–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

pmodFunction · 0.85
vec2Method · 0.80
locationMethod · 0.45

Tested by

no test coverage detected