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

Function vm_CrossProduct

vecmat/vector.cpp:263–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263void vm_CrossProduct(vector *dest, vector *u, vector *v) {
264 // Computes a cross product between u and v, returns the result
265 // in Normal. Dest cannot equal source.
266
267 dest->x = (u->y * v->z) - (u->z * v->y);
268 dest->y = (u->z * v->x) - (u->x * v->z);
269 dest->z = (u->x * v->y) - (u->y * v->x);
270}
271
272// Normalize a vector.
273// Returns: the magnitude before normalization

Callers 11

vm_GetPerpFunction · 0.70
vm_DeltaAngVecNormFunction · 0.70
do_physics_simFunction · 0.50
bump_obj_against_fixedFunction · 0.50
bump_two_objectsFunction · 0.50
PointSpeedFunction · 0.50
SetElementViewFunction · 0.50
SetSurfaceViewFunction · 0.50
SnapRoomFunction · 0.50
AITurnTowardsDirFunction · 0.50
GetBillboardCornersFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected