# X2 Matrix vs GL Matrix2 Rotations

## JavaScript performance comparison

Revision 12 of this test case created

## Preparation code

``<script src='http://sandbox.goxtk.com/x2/x2.js'></script><script src='http://sandbox.goxtk.com/x2/gl-matrix-min.js'></script><script src='https://rawgithub.com/mrdoob/three.js/master/build/three.js'></script><script src="https://rawgithub.com/1Pupik1989/N3D/master/test/N3D.js" require="Math"></script><script src='http://sandbox.goxtk.com/x2/xtk.js'></script>``

## Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in unknown unknown
Test Ops/sec
X2 Matrix
``var m1 = X.Matrix.identity();var v1 = new X.Vector(1, 2, 3);v1.normalize();X.Matrix.rotate(m1, Math.PI / 2, v1.x, v1.y, v1.z);``
pending…
GL Matrix2
``var m1 = mat4.create();var v1 = vec3.fromValues(1, 2, 3);mat4.rotate(m1, m1, Math.PI / 2, v1);``
pending…
three.js
``var m1 = new THREE.Matrix4();var v1 = new THREE.Vector3(1, 2, 3);m1.rotateByAxis(v1, Math.PI/2);``
pending…
N3D
``var v1 = new N3D_M_Vector3(0,1,0);var m1 = N3D_M_Matrix4.CreateRotationAroundAxis(Math.PI/2,v1);``
pending…
XTK
``var v1 = [1,2,3];var m1 = X.matrix.createIdentityMatrix(4);m1.rotate(Math.PI/2, v1);``
pending…

## Revisions

You can edit these tests or add even more tests to this page by appending `/edit` to the URL. Here’s a list of current revisions for this page:

• Revision 1: published by Daniel Haehn
• Revision 2: published by Daniel Haehn
• Revision 3: published by Daniel Haehn
• Revision 6: published
• Revision 12: published

Comment form temporarily disabled.