MCPcopy Create free account
hub / github.com/chrxh/alien / distance

Method distance

source/EngineInterface/SpaceCalculator.cpp:12–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10{}
11
12float SpaceCalculator::distance(RealVector2D const& a, RealVector2D const& b) const
13{
14 auto d = b - a;
15 correctDisplacement(d);
16 return toFloat(Math::length(d));
17}
18
19void SpaceCalculator::correctDisplacement(RealVector2D& displacement) const
20{

Callers

nothing calls this directly

Calls 1

toFloatFunction · 0.85

Tested by

no test coverage detected