| 181 | } |
| 182 | |
| 183 | float SystemWorld::clusterSize(CelestialCoordinate const& coordinate) const { |
| 184 | if (coordinate.isPlanetaryBody() && m_celestialDatabase->childOrbits(coordinate.parent()).contains(coordinate.orbitNumber())) { |
| 185 | auto childOrbits = m_celestialDatabase->childOrbits(coordinate).sorted(); |
| 186 | if (childOrbits.size() > 0) { |
| 187 | CelestialCoordinate outer = coordinate.child(childOrbits.get(childOrbits.size() - 1)); |
| 188 | return (planetOrbitDistance(outer) * 2) + planetSize(outer); |
| 189 | } else { |
| 190 | return planetSize(coordinate); |
| 191 | } |
| 192 | } else { |
| 193 | return planetSize(coordinate); |
| 194 | } |
| 195 | }; |
| 196 | |
| 197 | float SystemWorld::planetSize(CelestialCoordinate const& coordinate) const { |
| 198 | if (coordinate.isNull()) |
no test coverage detected