http://server.ccl.net/cca/software/SOURCES/C/mmconv/utility/vec_length.shtml |
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])); } |
[ CCL Home Page ]
[ utility ]
[ Raw Version of this page ]
Modified: Fri Feb 11 17:00:00 1994 GMT |
Page accessed 5182 times since Sat Apr 17 21:59:04 1999 GMT |