dotProduct method

double dotProduct(
  1. Vector2D o
)

Dot product of this vector and o.

Implementation

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