Implement 2x2 matrices #11
Merged
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.
Description
This PR implements 2x2 matrices (because I need them in Delta Client) and adds the
*multiplication operator to both 3x3 and 2x2 matrices (only 4x4 matrices had the operator).Detailed Design
I've essentially just copied the 3x3 implementations and modified them to be 2x2.
Documentation
The 2x2 matrix implementation is no less commented than the 3x3 matrix implementation :)
Testing
The 2x2 matrix implementation is no less tested than the 3x3 matrix implementation :) Although I am planning on PR'ing some tests for both 3x3 and 2x2 matrices in the future (and for other parts of the library too).
Performance
Uses the same implementation as the 3x3 matrices so it's probably slightly faster just cause they're smaller :)
Source Impact
I'm pretty sure I have avoided introducing any breaking changes.
Checklist