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

Function vm_GetNormalizedDir

vecmat/vector.cpp:406–409  ·  view source on GitHub ↗

Computes a normalized direction vector between two points 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

404// start,end - the start and end points used to calculate the vector
405// Returns: the distance between the two input points
406float vm_GetNormalizedDir(vector *dest, vector *end, vector *start) {
407 vm_SubVectors(dest, end, start);
408 return vm_NormalizeVector(dest);
409}
410
411// Returns a normalized direction vector between two points
412// Just like vm_GetNormalizedDir(), but uses sloppier magnitude, less precise

Callers 6

SnapRoomFunction · 0.50
BuildBridgeFunction · 0.50
JoinRoomsFunction · 0.50
GetAngleFunction · 0.50
BuildSmoothBridgeFunction · 0.50
AddScorchFunction · 0.50

Calls 2

vm_NormalizeVectorFunction · 0.85
vm_SubVectorsFunction · 0.70

Tested by

no test coverage detected