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 method to vector types that returns direction and length #291

Open
bitshifter opened this issue May 30, 2022 · 1 comment
Open

Add method to vector types that returns direction and length #291

bitshifter opened this issue May 30, 2022 · 1 comment

Comments

@bitshifter
Copy link
Owner

It's not uncommon to find the direction and length of a vector, but it is a hassle to do it manually. It would be good to have a method for this.

@paul-hansen
Copy link

Just poking through the open issues and seeing if there is anything I can help with.

Looks like length is already done: https://docs.rs/glam/0.21.3/glam/?search=length
Direction would probably just be normalize which is already done too: https://docs.rs/glam/0.21.3/glam/?search=normalize Unless you meant something else.

Anything else needed/missing here?

We could probably add a doc alias for normalize or something if we wanted to make normalize show up when you search for "direction"

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

No branches or pull requests

2 participants