dot static method

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

Implementation

static double dot(Vec2D a, Vec2D b) {
  return a.x * b.x + a.y * b.y;
}