dot static method

double dot(
  1. Vec2D a,
  2. Vec2D b
)

Implementation

static double dot(Vec2D a, Vec2D b) {
  return a[0] * b[0] + a[1] * b[1];
}