Fix translate matrix creation.
This commit is contained in:
parent
6061e72ea7
commit
a065e4965d
1 changed files with 4 additions and 4 deletions
|
@ -526,10 +526,10 @@ func MatrixSubtract(left, right raylib.Matrix) raylib.Matrix {
|
||||||
// MatrixTranslate - Returns translation matrix
|
// MatrixTranslate - Returns translation matrix
|
||||||
func MatrixTranslate(x, y, z float32) raylib.Matrix {
|
func MatrixTranslate(x, y, z float32) raylib.Matrix {
|
||||||
return raylib.NewMatrix(
|
return raylib.NewMatrix(
|
||||||
1.0, 0.0, 0.0, 0.0,
|
1.0, 0.0, 0.0, x,
|
||||||
0.0, 1.0, 0.0, 0.0,
|
0.0, 1.0, 0.0, y,
|
||||||
0.0, 0.0, 1.0, 0.0,
|
0.0, 0.0, 1.0, z,
|
||||||
x, y, z, 1.0)
|
0, 0, 0, 1.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians)
|
// MatrixRotate - Returns rotation matrix for an angle around an specified axis (angle in radians)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue