mathc icon indicating copy to clipboard operation
mathc copied to clipboard

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

Open suyashmohan opened this issue 3 years ago • 0 comments

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;
}

suyashmohan avatar Sep 08 '20 09:09 suyashmohan