Merge pull request #34 from egonelbre/master

Fix translate matrix creation.
This commit is contained in:
Milan Nikolic 2018-03-07 20:45:52 +01:00 committed by GitHub
commit 141858378a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -526,10 +526,10 @@ func MatrixSubtract(left, right raylib.Matrix) raylib.Matrix {
// MatrixTranslate - Returns translation matrix
func MatrixTranslate(x, y, z float32) raylib.Matrix {
return raylib.NewMatrix(
1.0, 0.0, 0.0, 0.0,
0.0, 1.0, 0.0, 0.0,
0.0, 0.0, 1.0, 0.0,
x, y, z, 1.0)
1.0, 0.0, 0.0, x,
0.0, 1.0, 0.0, y,
0.0, 0.0, 1.0, z,
0, 0, 0, 1.0)
}
// MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians)