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

Function vm_DeltaAngVecNorm

vecmat/vector.cpp:735–749  ·  view source on GitHub ↗

computes the delta angle between two normalized vectors.

Source from the content-addressed store, hash-verified

733
734// computes the delta angle between two normalized vectors.
735angle vm_DeltaAngVecNorm(vector *v0, vector *v1, vector *fvec) {
736 angle a;
737
738 a = FixAcos(vm_DotProduct(v0, v1));
739
740 if (fvec) {
741 vector t;
742
743 vm_CrossProduct(&t, v0, v1);
744 if (vm_DotProduct(&t, fvec) < 0)
745 a = -a;
746 }
747
748 return a;
749}
750
751// Gets the real center of a polygon
752// Returns the size of the passed in stuff

Callers 4

vm_DeltaAngVecFunction · 0.70
AITurnTowardsDirFunction · 0.50
Cinematic_StartCineFunction · 0.50
Cinematic_FrameFunction · 0.50

Calls 3

vm_DotProductFunction · 0.70
vm_CrossProductFunction · 0.70
FixAcosFunction · 0.50

Tested by

no test coverage detected