dot method

double dot(
  1. Vector vec
)

Return the dot product

Implementation

double dot(Vector vec) {
  return (x * vec.x) + (y * vec.y) + (z * vec.z);
}