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

Implement Neg for Direction2d and Direction3d #11179

Merged
merged 1 commit into from
Jan 2, 2024

Conversation

Jondolf
Copy link
Contributor

@Jondolf Jondolf commented Jan 2, 2024

Objective

I frequently encounter cases where I need to get the opposite direction. This currently requires something like Direction2d::from_normalized(-*direction), which is very inconvenient.

Solution

Implement Neg for Direction2d and Direction3d.

@Jondolf Jondolf added C-Usability A simple quality-of-life change that makes Bevy easier to use A-Math Fundamental domain-agnostic mathematical operations labels Jan 2, 2024
@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 2, 2024
@alice-i-cecile
Copy link
Member

Merging as trivial.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jan 2, 2024
Merged via the queue into bevyengine:main with commit 6086d41 Jan 2, 2024
26 checks passed
@Jondolf Jondolf deleted the neg-direction branch January 2, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Usability A simple quality-of-life change that makes Bevy easier to use S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants