Skip to content

Matrix fixes and improvements. - #116

Open
liamegan wants to merge 1 commit into
fix/vectorsfrom
fix/matrices
Open

liamegan wants to merge 1 commit into
fix/vectorsfrom
fix/matrices

Conversation

@liamegan

Copy link
Copy Markdown
Member
  • Mat2.fromAngle and Mat3.fromAngle now turn counter-clockwise, matching rotate and Vec2.rotate.
  • Mat3.fromQuat now rotates the same way as transformByQuat and matches the top-left 3×3 of Mat4.fromQuat. It used to rotate by the inverse.
  • columnArray on Mat2 and Mat3 now returns column-major order, the same as array, and is marked deprecated. A new rowArray gives the row-major order it used to return. array order for the classes remains column-major.
  • Quat.inverse and inverseNew are now another name for invert and invertNew, rather than taking 1 / x of each component.
  • Mat4.transformToNew sets the translation instead of adding to it.
  • Mat4.rotation is now right for non-uniform scale: it divides each column by that column's own scale.
  • Quat.lerp and Quat.interpolate now return a Quat.
  • Mat3.translate accepts a plain array or object as well as a Vec2, and has a new translateNew. Mat4.fromRotation's axis is now typed as a vector instead of any.

- Mat2.fromAngle and Mat3.fromAngle now turn counter-clockwise, matching rotate and Vec2.rotate.
- Mat3.fromQuat now rotates the same way as transformByQuat and matches the top-left 3×3 of Mat4.fromQuat. It used to rotate by the inverse.
- columnArray on Mat2 and Mat3 now returns column-major order, the same as array, and is marked deprecated. A new rowArray gives the row-major order it used to return. array order for the classes remains column-major.
- Quat.inverse and inverseNew are now another name for invert and invertNew, rather than taking 1 / x of each component.
- Mat4.transformToNew sets the translation instead of adding to it.
- Mat4.rotation is now right for non-uniform scale: it divides each column by that column's own scale.
- Quat.lerp and Quat.interpolate now return a Quat.
- Mat3.translate accepts a plain array or object as well as a Vec2, and has a new translateNew. Mat4.fromRotation's axis is now typed as a vector instead of any.
@liamegan
liamegan added this pull request to stack #115 November 26, 2026 17:28

This branch has not been deployed

No deployments
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.

1 participant