MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / dNormalize4

Function dNormalize4

3rd_party/Src/ode/ode/src/odemath.cpp:108–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106
107
108void dNormalize4 (dVector4 a)
109{
110 dAASSERT (a);
111 dReal l = dDOT(a,a)+a[3]*a[3];
112 if (l > 0) {
113 l = dRecipSqrt(l);
114 a[0] *= l;
115 a[1] *= l;
116 a[2] *= l;
117 a[3] *= l;
118 }
119 else {
120 dDEBUGMSG ("vector has zero size");
121 a[0] = 1;
122 a[1] = 0;
123 a[2] = 0;
124 a[3] = 0;
125 }
126}
127
128
129void dPlaneSpace (const dVector3 n, dVector3 p, dVector3 q)

Callers 4

dBodySetRotationFunction · 0.85
dBodySetQuaternionFunction · 0.85
moveAndRotateBodyFunction · 0.85
dxStepBodyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected