Float Quaternoinish Cross

From OpenLuna
Revision as of 16:19, 2 May 2009 by Snyder (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
int vcrossvq(float *p,float *q, float *r)
/* Cross product (r) of qutonian    */
/* vectors p and q (q[0]=0)         */
/* ges 050209                       */

{ 
r[0]=0.0;     /* just in case */ 
r[1]=p[2]*q[3]-p[3]*q[2]; 
r[2]=p[3]*q[1]-p[1]*q[3]; 
r[3]=p[1]*q[2]-p[2]*q[1];
 
} /* End vcrossvq */
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox