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

Function vm_GetNormalizedDirFast

vecmat/vector.cpp:416–419  ·  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

414// start,end - the start and end points used to calculate the vector
415// Returns: the distance between the two input points
416float vm_GetNormalizedDirFast(vector *dest, vector *end, vector *start) {
417 vm_SubVectors(dest, end, start);
418 return vm_NormalizeVectorFast(dest);
419}
420
421float vm_GetMagnitudeFast(vector *v) {
422 float a, b, c, bc;

Callers 2

DoGravityFieldEffectFunction · 0.50
DoConcussiveForceFunction · 0.50

Calls 2

vm_NormalizeVectorFastFunction · 0.85
vm_SubVectorsFunction · 0.70

Tested by

no test coverage detected