rem: } else { if (axis.dimensions() != 3) { return null; } axis.normalize(); var rot = Matrix.RotationZ(t); if (axis.isParallelTo(Vector.k)) {  return rot; } else { var projectionOnXY = Vector.create(axis.e(1), axis.e(2), 0); var z_rot = Matrix.I(3), inv_z_rot = Matrix.I(3); if (!projectionOnXY.isParallelTo(Vector.i)) {  var Za = projectionOnXY.cross(Vector.i).normalize(); var Zt = Za.e(3) * projectionOnXY.angleFrom(Vector.i); axis = Matrix.RotationZ(Zt).x(axis).col(1); z_rot = Matrix.RotationZ(Zt); inv_z_rot = Matrix.RotationZ(-Zt); }  var Ya = axis.cross(Vector.k).normalize(); var Yt = Ya.e(2) * axis.angleFrom(Vector.k); var y_rot = Matrix.RotationY(Yt); var inv_y_rot = Matrix.RotationY(-Yt); return inv_z_rot.x(inv_y_rot).x(rot).x(y_rot).x(z_rot); } 
context: Matrix.Rotation = function(t, a) {  var axis = a.dup();  if (!axis) {    return Matrix.create([      [Math.cos(t),  -Math.sin(t)],      [Math.sin(t),   Math.cos(t)]    ]);  } else {    if (axis.dimensions() != 3) { return null; }    axis.normalize();    var rot = Matrix.RotationZ(t);    if (axis.isParallelTo(Vector.k)) {      // Axis is parallel to z-axis - just return that rotation      return rot;    } else {      var projectionOnXY = Vector.create(axis.e(1), axis.e(2), 0);      var z_rot = Matrix.I(3), inv_z_rot = Matrix.I(3);      if (!projectionOnXY.isParallelTo(Vector.i)) {        // Axis does not lie in X-Z plane - change co-ordinates through R(Z)        var Za = projectionOnXY.cross(Vector.i).normalize();        var Zt = Za.e(3) * projectionOnXY.angleFrom(Vector.i);        axis = Matrix.RotationZ(Zt).x(axis).col(1);        z_rot = Matrix.RotationZ(Zt);        inv_z_rot = Matrix.RotationZ(-Zt);      }      // Axis lies in X-Z plame - change co-ordinates so that axis = z-axis, through R(Y)      var Ya = axis.cross(Vector.k).normalize();      var Yt = Ya.e(2) * axis.angleFrom(Vector.k);      var y_rot = Matrix.RotationY(Yt);      var inv_y_rot = Matrix.RotationY(-Yt);      return inv_z_rot.x(inv_y_rot).x(rot).x(y_rot).x(z_rot);    }  }};
meta: 3877	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/3877/1ce0b09b1b1d7871f98dcc4d340508d1a6cfd45e/sylvester.src.js/clean/sylvester.src.js