dotProduct method

double dotProduct(
  1. Vector2D o
)

Implementation

double dotProduct(Vector2D o) => x * o.x + y * o.y;