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

Function vm_VectorDistance

scripts/osiris_vector.h:228–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

226}
227
228float vm_VectorDistance(const vector *a, const vector *b) {
229 // Given two vectors, returns the distance between them
230
231 vector dest;
232 float dist;
233
234 vm_SubVectors(&dest, a, b);
235 dist = vm_GetMagnitude(&dest);
236 return dist;
237}
238float vm_VectorDistanceQuick(vector *a, vector *b) {
239 // Given two vectors, returns the distance between them
240

Callers 14

Obj_GetObjDistFunction · 0.70
DetermineDeathPosMethod · 0.70
DoFrameMethod · 0.70
ComputeNestMethod · 0.70
DoSquadieFrameMethod · 0.70
TraverseShotPathFunction · 0.70
ProjectBeamMethod · 0.70
DoSquadieFrameMethod · 0.70
SetHideRoomGoalMethod · 0.70
DoFrameMethod · 0.70
Obj_GetObjDistFunction · 0.70
qObjGetDistanceFunction · 0.70

Calls 2

vm_SubVectorsFunction · 0.70
vm_GetMagnitudeFunction · 0.70

Tested by

no test coverage detected