dotProduct static method

double dotProduct(
  1. Vec a,
  2. Vec b
)

Implementation

static double dotProduct(Vec a, Vec b) => a.x * b.x + a.y * b.y;