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

Function vm_GetNormalizedDirFast

scripts/osiris_vector.h:460–463  ·  view source on GitHub ↗

Returns a normalized direction vector between two points Just like vm_GetNormalizedDir(), but uses sloppier magnitude, less precise Parameters: dest - filled in with the normalized direction vector start,end - the start and end points used to calculate the vector Returns: the distance between the two input points

Source from the content-addressed store, hash-verified

458// start,end - the start and end points used to calculate the vector
459// Returns: the distance between the two input points
460float vm_GetNormalizedDirFast(vector *dest, vector *end, vector *start) {
461 vm_SubVectors(dest, end, start);
462 return vm_VectorNormalizeFast(dest);
463}
464
465float vm_GetMagnitudeFast(vector *v) {
466 float a, b, c, bc;

Callers 3

qObjCanSeePlayerFunction · 0.70
qObjCanSeePlayerAdvancedFunction · 0.70

Calls 2

vm_SubVectorsFunction · 0.70
vm_VectorNormalizeFastFunction · 0.70

Tested by

no test coverage detected