dot method

double dot(
  1. Vector v2
)

Returns the dot product of two vectors.

Implementation

double dot(Vector v2) => x * v2.x + y * v2.y;