Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MatStack.LeftMul performs same process as Mat.Stack.RightMul #37

Closed
beaubrueggemann opened this issue Mar 7, 2015 · 1 comment · Fixed by #38
Closed

MatStack.LeftMul performs same process as Mat.Stack.RightMul #37

beaubrueggemann opened this issue Mar 7, 2015 · 1 comment · Fixed by #38

Comments

@beaubrueggemann
Copy link
Contributor

Both mgl32 and mgl64 versions of matstack.MatStack contain a peculiar LeftMul method:

// Left multiplies the current top of the matrix by the
// argument.
func (ms *MatStack) LeftMul(m mgl32.Mat4) {
        (*ms)[len(*ms)-1] = (*ms)[len(*ms)-1].Mul4(m)
}

This incorrectly performs a right multiply (it matches exactly the RightMul implementation). The operands to Mul4 need to be swapped.

@dmitshur
Copy link
Member

dmitshur commented Mar 7, 2015

That does look like an issue, thanks for reporting!

Would you like to make a PR that fixes it? I think it'd have a good chance of being merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants