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

Method randomArrivalPosition

source/game/StarSystemWorld.cpp:292–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292Vec2F SystemWorld::randomArrivalPosition() const {
293 RandomSource rand;
294 float range = m_config.arrivalRange[0] + (rand.randf() * (m_config.arrivalRange[1] - m_config.arrivalRange[0]));
295 float angle = rand.randf() * Constants::pi * 2;
296 return Vec2F::withAngle(angle, range);
297}
298
299Maybe<WarpAction> SystemWorld::objectWarpAction(Uuid const& uuid) const {
300 if (auto object = getObject(uuid)) {

Callers

nothing calls this directly

Calls 1

randfMethod · 0.80

Tested by

no test coverage detected