Well if all you are after is the dot and cross product of two vectors then they are worked out as follows:
dot product:
assuming that a and b are vectors where a[0] is the x component, a[1] is the y and a[2] is the z, same goes for b[0],b[1],b[2] then you do this:
a.b = a[0]*b[0] + a[1]*b[1] + a[2]*b[2], which returns a scalar value. It is also the same as:
|a||b|cos(theta) where |a|, |b| are the magnitudes of vectors a,b and theta is the angle between them.
for the cross product, using the same notation as above:
a x b = c, where c is a vector with the following values for each component:
c[0]=a[1]*b[2]-a[2]*b[1]
c[1]=a[3]*b[0]-a[0]*b[3]
c[2]=a[0]*b[1]-a[1]*b[0]
dot product:
assuming that a and b are vectors where a[0] is the x component, a[1] is the y and a[2] is the z, same goes for b[0],b[1],b[2] then you do this:
a.b = a[0]*b[0] + a[1]*b[1] + a[2]*b[2], which returns a scalar value. It is also the same as:
|a||b|cos(theta) where |a|, |b| are the magnitudes of vectors a,b and theta is the angle between them.
for the cross product, using the same notation as above:
a x b = c, where c is a vector with the following values for each component:
c[0]=a[1]*b[2]-a[2]*b[1]
c[1]=a[3]*b[0]-a[0]*b[3]
c[2]=a[0]*b[1]-a[1]*b[0]