function adjoint(out, a) {
  // Caching this value is nessecary if out == a
  var a0 = a[0];
  out[0] = a[3];
  out[1] = -a[1];
  out[2] = -a[2];
  out[3] = a0;

  return out;
}
Calculates the adjugate of a mat2

@param {mat2} out the receiving matrix
@param {mat2} a the source matrix
@returns {mat2} out