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

Function vm_VectorDistance

vecmat/vector.cpp:185–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185float vm_VectorDistance(const vector *a, const vector *b) {
186 // Given two vectors, returns the distance between them
187
188 vector dest;
189 float dist;
190
191 vm_SubVectors(&dest, a, b);
192 dist = vm_GetMagnitude(&dest);
193 return dist;
194}
195float vm_VectorDistanceQuick(vector *a, vector *b) {
196 // Given two vectors, returns the distance between them
197

Callers 15

vm_ComputeBoundingSphereFunction · 0.70
ComputeDefaultSizeFuncFunction · 0.50
do_physics_simFunction · 0.50
check_vector_to_sphere_1Function · 0.50
check_sphere_to_faceFunction · 0.50
fvi_FindIntersectionFunction · 0.50
do_fvi_terrainFunction · 0.50
MoveObjectFunction · 0.50
PointsAreSameFunction · 0.50
ClipEdgeFunction · 0.50
CheckDuplicatePointsFunction · 0.50
FindTJointsFunction · 0.50

Calls 2

vm_SubVectorsFunction · 0.70
vm_GetMagnitudeFunction · 0.70

Tested by

no test coverage detected