1
/* Copyright (C) 2000 Damir Zucic */
3
/*=============================================================================
8
Calculate the scalar product of two vectors.
11
(1) Pointer to VectorS structure, with the first vector.
12
(2) Pointer to VectorS structure, with the second vector.
18
Scalar product of two vectors (double value).
20
========includes:============================================================*/
25
#include <X11/Xutil.h>
27
#include <X11/Xatom.h>
32
/*======calculate scalar product of two vectors:=============================*/
34
double ScalarProduct_ (VectorS *vector1SP, VectorS *vector2SP)
37
return (vector1SP->x * vector2SP->x +
38
vector1SP->y * vector2SP->y +
39
vector1SP->z * vector2SP->z);
43
/*===========================================================================*/