utils: added translation and box shape

This commit is contained in:
2017-06-06 09:16:18 -04:00
parent 1f1cf4bd16
commit 7514345d8f
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
mat2 rotate2d(float a) {
float c = cos(a);
return mat2(c, -sin(a), sin(a), c);
}
mat2 scale(vec2 s) {
return mat2(s.x, 0., 0., s.y);
}