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

smat4_rotation_* looks wrong. Shouldn't they be initialised with identity matrix? #45

Open
suyashmohan opened this issue Sep 8, 2020 · 0 comments

Comments

@suyashmohan
Copy link

On https://github.com/felselva/mathc/blob/master/mathc.c#L5169 mat4 result is defined which is passed to mat4_rotation_x. Inside mat4_rotation_x only values at index 5,6,9, and 10 are updated.
Also as per the example, in README, identity matrix was generated before passing it to mat4_rotation_x.

So shouldn't smat_rotation_* methods also set identity matrix before calling mat4_rotation_x?

E.g.

struct mat4 smat4_rotation_x(mfloat_t f)
{
	struct mat4 result = smat4_identity();
	mat4_rotation_x((mfloat_t *)&result, f);
	return result;
}
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

No branches or pull requests

1 participant