dotProduct method

double dotProduct(
  1. Point other
)

Implementation

double dotProduct(Point other) => x * other.x + y * other.y;