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

feat: Add helper methods to create matrix4 with sensible defaults #3486

Merged
merged 2 commits into from
Feb 10, 2025

Conversation

luanpotter
Copy link
Member

Description

Add helper methods to create matrix4 with sensible defaults.

The provided compose function from Matrix4 has two issues IMO:

  • no sensible defaults, so all 3 parameters must be specified
  • no named parameters, which can cause confusion when used

These new helpers make it much easier to create simpler matrixes, especially for a single or couple of operations (but not all 3).

Checklist

  • I have followed the Contributor Guide when preparing my PR.
  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation in docs and added dartdoc comments with ///.
  • I have updated/added relevant examples in examples or docs.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Copy link
Contributor

github-actions bot commented Feb 10, 2025

Benchmark Results

Package flame:

Benchmarks Current Branch
[luan.compose]
Base Branch
[main]
Diff
Render Components Benchmark 1165.263 μs 1147.784 μs 🔴 +1.523 %
Updating Components Benchmark 246525.667 μs 262762.000 μs 🟢 -6.179 %

Benchmarks provided with 💙 by Dart Benchmark Action.

@luanpotter luanpotter marked this pull request as ready for review February 10, 2025 03:42
@luanpotter luanpotter requested a review from spydon February 10, 2025 03:42
@luanpotter luanpotter merged commit 9345c87 into main Feb 10, 2025
9 checks passed
@luanpotter luanpotter deleted the luan.compose branch February 10, 2025 13:29
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