dot method

double dot(
  1. Vector other
)

Implementation

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