2
0
mirror of synced 2025-02-20 13:38:20 +00:00

go.mobile/f32: make Mat4.Translate take a pointer, to be consistent

with the other methods.

LGTM=crawshaw
R=crawshaw
CC=golang-codereviews
https://golang.org/cl/147420043
This commit is contained in:
Nigel Tao 2014-10-02 09:35:09 +10:00
parent 75e726bb56
commit 4313b67f84

View File

@ -75,8 +75,8 @@ func (m *Mat4) Scale(src *Mat4, scale *Vec3) {
m[3] = src[3]
}
func (m *Mat4) Translate(src Mat4, v *Vec3) {
*m = src
func (m *Mat4) Translate(src *Mat4, v *Vec3) {
*m = *src
m[3][0] = src[0][0]*v[0] + src[1][0]*v[1] + src[2][0]*v[2] + src[3][0]
m[3][1] = src[0][1]*v[0] + src[1][1]*v[1] + src[2][1]*v[2] + src[3][1]