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

Method magnitude

source/game/scripting/StarWorldLuaBindings.cpp:629–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627 }
628
629 float WorldCallbacks::magnitude(World* world, Vec2F pos1, Maybe<Vec2F> pos2) {
630 if (pos2)
631 return world->geometry().diff(pos1, *pos2).magnitude();
632 else
633 return pos1.magnitude();
634 }
635
636 Vec2F WorldCallbacks::distance(World* world, Vec2F const& arg1, Vec2F const& arg2) {
637 return world->geometry().diff(arg1, arg2);

Callers 15

tileAreaBrushFunction · 0.45
simulateArcMethod · 0.45
distanceMethod · 0.45
interactiveEntityNearMethod · 0.45
findPathMethod · 0.45
moveMethod · 0.45
updateTakenMethod · 0.45
sparkDamagedBlocksMethod · 0.45
orbitPositionMethod · 0.45
serverUpdateMethod · 0.45
produceConstellationsMethod · 0.45
sparkBlockMethod · 0.45

Calls 2

diffMethod · 0.45
geometryMethod · 0.45

Tested by 1

pointInspectionLevelMethod · 0.36