MCPcopy Create free account
hub / github.com/assaultcube/AC / GetDistance

Function GetDistance

source/src/bot/bot_util.cpp:302–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300}
301
302float GetDistance(vec v1, vec v2)
303{
304 if ((v1.x == 0) && (v2.x == 0) && (v1.y == 0) && (v2.y == 0) && (v1.z == 0) &&
305 (v2.z == 0))
306 return 0.0f;
307
308 return v1.dist(v2);
309}
310
311// As GetDistance(), but doesn take height in account.
312float Get2DDistance(vec v1, vec v2)

Callers 15

ChoosePreferredWeaponMethod · 0.85
loopvFunction · 0.85
HeadToTargetEntMethod · 0.85
loopvFunction · 0.85
TraceLineFunction · 0.85
AimToVecMethod · 0.85
IsVisibleMethod · 0.85
ThinkMethod · 0.85
DrawNearWaypointsMethod · 0.85
WPIsReachableMethod · 0.85
GetNearestWaypointMethod · 0.85

Calls 1

distMethod · 0.80

Tested by

no test coverage detected