#include "utility.h"
double vec_dotprod(vector1,vector2)
/*============================================================================*/
/* PURPOSE: CALCULATE THE DOT PRODUCT OF TWO VECTORS.
/* INPUTS:
/* VECTOR1 (X,Y,Z) TRIPLET.
/* VECTOR2 (X,Y,Z) TRIPLET.
/* OUTPUTS:
/* FUNCTION VALUE DOT PRODUCT OF VECTOR1 AND VECTOR2.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
double vector1[3];
double vector2[3];
{
/* DETERMINE THE DOT PRODUCT OF THE VECTORS. */
return(vector1[0]*vector2[0] + vector1[1]*vector2[1] + vector1[2]*vector2[2]);
}
|