Skip to content

Implement Mul for Transform #346

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

Merged
merged 1 commit into from
Jul 31, 2025

Conversation

dogunbound
Copy link
Contributor

@dogunbound dogunbound commented Jul 30, 2025

Seems like it is implemented in SFML like such, so I copied the behavior from SFML to here.

Issue: #203

@dogunbound dogunbound marked this pull request as draft July 30, 2025 13:31
Seems like it is implemented in SFML like such, so I copied the behavior
from SFML to here.
@dogunbound dogunbound marked this pull request as ready for review July 30, 2025 22:09
/// assert_eq!(test_transform * test_transform, result);
/// ```
fn mul(self, rhs: Self) -> Self::Output {
let mut clone_self = self;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could just make self mut in the parameter list. But this is fine too I guess.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, so the base SFML implementation has it where it clones itself like so. would that do the same here? I actually don't know. If it just clones self if i put mut there, then yeah I should have done it like that. Oh well. I don't know everything about rust :P

@crumblingstatue crumblingstatue merged commit 107e0bd into jeremyletang:master Jul 31, 2025
3 checks passed
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