function distance(a, b) {
  var x = b[0] - a[0];
  var y = b[1] - a[1];
  var z = b[2] - a[2];
  var w = b[3] - a[3];
  return Math.sqrt(x * x + y * y + z * z + w * w);
}
Calculates the euclidian distance between two vec4's

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