Skip to content

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

@suyashmohan

Description

@suyashmohan

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions