stats_server/views/statics/vendors/3d/d3.js
function d3_transform(m) {
  var r0 = [m.a, m.b],
      r1 = [m.c, m.d],
      kx = d3_transformNormalize(r0),
      kz = d3_transformDot(r0, r1),
      ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz));
  this.translate = [m.e, m.f];
  this.rotate = Math.atan2(m.b, m.a) * d3_transformDegrees;
  this.scale = [kx, ky || 0];
  this.skew = ky ? kz / ky * d3_transformDegrees : 0;
}
function d3_transform(m) {
  var r0 = [m.a, m.b],
      r1 = [m.c, m.d],
      kx = d3_transformNormalize(r0),
      kz = d3_transformDot(r0, r1),
      ky = d3_transformNormalize(d3_transformCombine(r1, r0, -kz));
  this.translate = [m.e, m.f];
  this.rotate = Math.atan2(m.b, m.a) * d3_transformDegrees;
  this.scale = [kx, ky || 0];
  this.skew = ky ? kz / ky * d3_transformDegrees : 0;
}
Compute x-scale and normalize the first row. Compute shear and make second row orthogonal to first. Compute y-scale and normalize the second row. Finally, compute the rotation.