dotProduct method

double dotProduct(
  1. V2 o
)

Dot product of this vector and o.

Implementation

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