dot method

double dot(
  1. Vector2 other
)

Implementation

double dot(Vector2 other) => x * other.x + y * other.y;