MCPcopy Create free account
hub / github.com/demoth/jake2 / MakeNormalVectors

Method MakeNormalVectors

qcommon/src/main/java/jake2/qcommon/util/Math3D.java:227–238  ·  view source on GitHub ↗
(float[] forward, float[] right, float[] up)

Source from the content-addressed store, hash-verified

225 }
226
227 public static void MakeNormalVectors(float[] forward, float[] right, float[] up) {
228 // this rotate and negat guarantees a vector
229 // not colinear with the original
230 right[1] = -forward[0];
231 right[2] = forward[1];
232 right[0] = forward[2];
233
234 float d = DotProduct(right, forward);
235 VectorMA(right, -d, forward, right);
236 VectorNormalize(right);
237 CrossProduct(right, forward, up);
238 }
239 public static float SHORT2ANGLE(int x) {
240 return (x * shortratio);
241 }

Callers 7

RailTrailMethod · 0.95
RailTrailMethod · 0.95
RailTrailMethod · 0.95
DebugTrailMethod · 0.95
ParticleSteamEffectMethod · 0.95
ParticleSteamEffect2Method · 0.95
ParticleSmokeEffectMethod · 0.95

Calls 4

DotProductMethod · 0.95
VectorMAMethod · 0.95
VectorNormalizeMethod · 0.95
CrossProductMethod · 0.95

Tested by 2

RailTrailMethod · 0.76
RailTrailMethod · 0.76