dot method

num dot(
  1. Vector2 v
)

Implementation

num dot(Vector2 v) {
  return x * v.x + y * v.y;
}