function distance(a, b) {
    var x = b[0] - a[0],
        y = b[1] - a[1];
    return Math.hypot(x, y);
  }
Calculates the euclidian distance between two vec2's

@param {ReadonlyVec2} a the first operand
@param {ReadonlyVec2} b the second operand
@returns {Number} distance between a and b