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

Function vm_VectorDistanceQuick

scripts/osiris_vector.h:238–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

236 return dist;
237}
238float vm_VectorDistanceQuick(vector *a, vector *b) {
239 // Given two vectors, returns the distance between them
240
241 vector dest;
242 float dist;
243
244 vm_SubVectors(&dest, a, b);
245 dist = vm_GetMagnitudeFast(&dest);
246 return dist;
247}
248
249// Calculates the perpendicular vector given three points
250// Parms: n - the computed perp vector (filled in)

Callers 3

FindClosestPlayerFunction · 0.70
DetermineClosestRoomMethod · 0.70
qPlayerClosestFunction · 0.70

Calls 2

vm_SubVectorsFunction · 0.70
vm_GetMagnitudeFastFunction · 0.70

Tested by

no test coverage detected