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

double vec_length(vector)
/*============================================================================*/
/* PURPOSE: CALCULATE THE LENGTH OF A VECTOR.
/* INPUTS:
/*	VECTOR		(X,Y,Z) TRIPLET.
/* OUTPUTS:
/*	FUNCTION VALUE	LENGTH OF VECTOR.
/* WRITTEN: M.V.GRIESHABER
/* LAST MODIFICATION: 11 JUNE 1991 MVG
*/
   double vector[3];
   {
   /* DETERMINE THE LENGTH OF THE VECTOR. */
   return(sqrt(vector[0]*vector[0] + vector[1]*vector[1] + vector[2]*vector[2]));
   }
Modified: Fri Feb 11 17:00:00 1994 GMT
Page accessed 5215 times since Sat Apr 17 21:59:04 1999 GMT