CCL Home Page
Up Directory CCL vec_crossprod
#include "utility.h"

void vec_crossprod(vector1,vector2,vector3)
/*============================================================================*/
/* PURPOSE: CALCULATE THE CROSS PRODUCT OF TWO VECTORS.
/* INPUTS:
/*	VECTOR1		(X,Y,Z) TRIPLET.
/*	VECTOR2		(X,Y,Z) TRIPLET.
/* OUTPUTS:
/*	VECTOR3		(X,Y,Z) TRIPLET EQUAL TO (VECTOR1 CROSS VECTOR2).
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   double vector1[3];
   double vector2[3];
   double vector3[3];
   {
   /* DETERMINE THE CROSS PRODUCT OF THE VECTORS. */
   vector3[0]=vector1[1]*vector2[2] - vector1[2]*vector2[1];
   vector3[1]=vector1[2]*vector2[0] - vector1[0]*vector2[2];
   vector3[2]=vector1[0]*vector2[1] - vector1[1]*vector2[0];

   return;
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 4877 times since Sat Apr 17 21:59:03 1999 GMT