Created
October 26, 2016 07:39
-
-
Save jmurzy/a4d794c9342504e2ccb81550d7ca2ed3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rotateX(deg) { | |
const rad = (Math.PI / 180) * deg; | |
const cos = Math.cos(rad); | |
const sin = Math.sin(rad); | |
return [ | |
1, 0, 0, 0, | |
0, cos, -sin, 0, | |
0, sin, cos, 0, | |
0, 0, 0, 1, | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment