Difference between revisions of "Float Quaternoinish Cross"

From OpenLuna
Jump to: navigation, search
(New page: waiting for the source...)
 
 
Line 1: Line 1:
  waiting for the source...
+
  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 */

Latest revision as of 16:19, 2 May 2009

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