innerProduct function

double innerProduct(
  1. List vec1,
  2. List vec2
)

Implementation

double innerProduct(List vec1, List vec2) {
  return vec1[0] * vec2[0] + vec1[1] * vec2[1];
}