Skip to content

Add Mat22 reflection and shear constructors - #63

Merged
crertel merged 1 commit into
masterfrom
44-mat22-transforms
Sep 16, 2026
Merged

crertel merged 1 commit into
masterfrom
44-mat22-transforms

Conversation

@crertel

@crertel crertel commented Sep 16, 2026

Copy link
Copy Markdown
Owner

Adds Mat22.make_reflect/1, make_shear_x/1, and make_shear_y/1 for 2D linear transformations, using the library's row-vector convention.

Reflection accepts any nonzero normal and mirrors across the line through the origin. Normal scaling avoids overflow or underflow from squaring very large or small normals; a zero normal raises ArithmeticError. Shear docs state which coordinate changes and give its equation. All constructors retain float typespecs and explicit float clauses with numeric fallbacks.

Validation: 494 tests and 1 doctest pass with 100% line coverage. Tests cover axis and oblique mirrors, normal scaling, reflection invariants, both shear directions, inverses, composition order, and integer/mixed inputs. Formatting, compilation with warnings as errors, and documentation generation pass.

Part of #44.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — 44-mat22-transforms into master

1 similar comment
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 100.0%. remained the same — 44-mat22-transforms into master

@crertel
crertel merged commit f0d6226 into master Sep 16, 2026
4 checks passed
@crertel
crertel deleted the 44-mat22-transforms branch September 16, 2026 04:19
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.

2 participants