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

Add impl From<Dir2> for Vec2 #12529

Closed
afonsolage opened this issue Mar 17, 2024 · 0 comments · Fixed by #12594
Closed

Add impl From<Dir2> for Vec2 #12529

afonsolage opened this issue Mar 17, 2024 · 0 comments · Fixed by #12594
Labels
A-Math Fundamental domain-agnostic mathematical operations C-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!

Comments

@afonsolage
Copy link
Contributor

What problem does this solve or what need does it fill?

While review #12516 I noticed there is no impl From<Dir2> for Vec2.

What solution would you like?

Implement this trait to be able to convert from Dir2 to Vec2.

What alternative(s) have you considered?

Using Deref but Dir3 and Dir3A both have conversion from Dir* to Vec*

@afonsolage afonsolage added C-Feature A new feature, making something new possible S-Needs-Triage This issue needs to be labelled labels Mar 17, 2024
@SolarLiner SolarLiner added A-Math Fundamental domain-agnostic mathematical operations S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it! D-Trivial Nice and easy! A great choice to get started with Bevy and removed S-Needs-Triage This issue needs to be labelled labels Mar 17, 2024
github-merge-queue bot pushed a commit that referenced this issue Mar 20, 2024
# Objective

Allow converting from `Dir2` to `Vec2` in generic code. Fixes #12529.

## Solution

Added a `From<Dir2>` impl for `Vec2`.
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-Feature A new feature, making something new possible D-Trivial Nice and easy! A great choice to get started with Bevy S-Ready-For-Implementation This issue is ready for an implementation PR. Go for it!
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants