Resolve Inconsistency in Matrix3 and Matrix4 rotateY
Implementations
#315
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses the issues highlighted in #261 and is related to the discussions in #262 and #300, as well as the historical context provided by #69.
In reference to the conversation in #262, two primary concerns were identified:
rotateY
methods in theMatrix3
andMatrix4
classes.Here's a summary of the remedial actions taken in this PR:
This PR is similar to #262. The only difference is that this PR also includes a negated rotation angle in the
obb3
test.For issue (1), the test expectations have been updated to reflect the correct signs, ensuring that all tests now pass.
Regarding issue (2), upon further investigation, it was found that the
Matrix4
class already had the correct implementation since August 23, 2014. However, theMatrix3
class has not been updated to match this, leading to a longstanding inconsistency between the two. This PR rectifies theMatrix3
rotateY
method to align with theMatrix4
implementation, bringing them into consistency.This PR is similar to #262. The only difference is that this PR also includes a negated rotation angle in the
obb3
test.By merging this PR, we will resolve the inconsistencies and adhere to the mathematical definitions of rotation matrices, as expected by the users of the
vector_math.dart
library.I look forward to your feedback and to further improving the library.