dot function

double dot(
  1. List<double> a,
  2. List<double> b
)

Calculates the dot product of two vec3's

@param {ReadonlyVec3} a the first operand @param {ReadonlyVec3} b the second operand @returns {Number} dot product of a and b

Implementation

double dot(List<double> a, List<double> b) {
  return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];
}