MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / vm_VectorDistanceQuick

Function vm_VectorDistanceQuick

vecmat/vector.cpp:195–204  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

193 return dist;
194}
195float vm_VectorDistanceQuick(vector *a, vector *b) {
196 // Given two vectors, returns the distance between them
197
198 vector dest;
199 float dist;
200
201 vm_SubVectors(&dest, a, b);
202 dist = vm_GetMagnitudeFast(&dest);
203 return dist;
204}
205
206// Calculates the perpendicular vector given three points
207// Parms: n - the computed perp vector (filled in)

Callers 15

do_physics_simFunction · 0.50
msafe_CallFunctionFunction · 0.50
ApplyLightingToSubmodelFunction · 0.50
ApplyLightingToRoomsFunction · 0.50
DestroyLightFunction · 0.50
MultiSendMSafeFunctionFunction · 0.50
DoObjectLightFunction · 0.50
DestroyObjectFunction · 0.50
DoGravityFieldEffectFunction · 0.50
DoExplosionFrameFunction · 0.50

Calls 2

vm_SubVectorsFunction · 0.70
vm_GetMagnitudeFastFunction · 0.70

Tested by

no test coverage detected