function squaredLength(a) {
  var x = a[0],
      y = a[1];
  return x * x + y * y;
}
Calculates the squared length of a vec2

@param {vec2} a vector to calculate squared length of
@returns {Number} squared length of a