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

vecX: add setLength function #25

Merged
merged 3 commits into from
Mar 26, 2024
Merged

vecX: add setLength function #25

merged 3 commits into from
Mar 26, 2024

Conversation

mreinstein
Copy link
Contributor

@mreinstein mreinstein commented Mar 24, 2024

I've found this useful in scenarios where I'm treating an existing vector as a direction, and want to set it to a specific length. (e.g., updating the speed component a velocity vector for a moving object without changing it's direction component.)

@greggman greggman merged commit 2451bb4 into greggman:main Mar 26, 2024
1 check 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