dot method

double dot(
  1. Vec2 other
)

Implementation

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