Declaration: VectorDotProduct (Vec1, Vec2: TDoubleArray; var Product: double): integer;
The function VectorDotProduct calculates the dot product of the two vectors Vec1 and Vec2 and returns the result in the variable parameter Product.

The function returns the following error codes:

 0 .... everything OK
-1 ... Vec1 or Vec2 has size zero
-2 ... Vec1 and Vec2 do not exhibit the same length