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

No invert() for Mat3 and others #63

Open
faulesocke opened this issue Dec 18, 2020 · 1 comment
Open

No invert() for Mat3 and others #63

faulesocke opened this issue Dec 18, 2020 · 1 comment

Comments

@faulesocke
Copy link

Currently it seems like invert() is only defined for Mat4 types, but not Mat3 and Mat2. Is there a reason for this?

@yoanlcq
Copy link
Owner

yoanlcq commented Dec 18, 2020

Hi, well not really, it's only because inverting Mat4 types is all I needed. I'm totally OK with implementing this though, or accepting PRs that add this.

In practice I often found Mat3 values to be orthogonal (when they are simple combinations of translations, rotations and scales), in which case the inverse can be obtained by transposing.

A workaround is also to convert the Mat3 to Mat4, then invert the Mat4, then convert back to Mat3, but I agree it's not great.

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

2 participants