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

Matrix3/4: Introduce invert(). #20611

Merged
merged 1 commit into from
Nov 3, 2020
Merged

Matrix3/4: Introduce invert(). #20611

merged 1 commit into from
Nov 3, 2020

Conversation

Mugen87
Copy link
Collaborator

@Mugen87 Mugen87 commented Nov 3, 2020

Related issues:

Fixed #20572.

Description

The PR also deprecates getInverse(). This change is backward-compatible since getInverse() can internally use the new method in Three.Legacy.js.

@Mugen87
Copy link
Collaborator Author

Mugen87 commented Nov 3, 2020

BTW: There is already Quaternion.inverse(). Should we still name the method invert()?

@mrdoob
Copy link
Owner

mrdoob commented Nov 3, 2020

BTW: There is already Quaternion.inverse(). Should we still name the method invert()?

I think a verb is better. Like normalize(). So we probably should rename the Quaternion one too...

@mrdoob mrdoob added this to the r123 milestone Nov 3, 2020
@mrdoob mrdoob merged commit c13e321 into mrdoob:dev Nov 3, 2020
@mrdoob
Copy link
Owner

mrdoob commented Nov 3, 2020

Thanks!

@@ -213,7 +206,7 @@ class Matrix3 {

getNormalMatrix( matrix4 ) {

return this.setFromMatrix4( matrix4 ).getInverse( this ).transpose();
return this.setFromMatrix4( matrix4 ).copy( this ).invert().transpose();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return this.setFromMatrix4( matrix4 ).invert().transpose();

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ops

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 this pull request may close these issues.

Change the behavior or name of Matrix.getInverse() to align with the rest of the API
3 participants