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

Vec2::times(Float) #44

Merged
merged 1 commit into from
May 17, 2024
Merged

Vec2::times(Float) #44

merged 1 commit into from
May 17, 2024

Conversation

Bixilon
Copy link
Member

@Bixilon Bixilon commented May 17, 2024

This is a common multiplication that is done. The problem is, if you multiply by 0.x then it is casted to an int (and before to a number object), so you multiply by 0 and then the result is 0. You normally don't expect that (and it is causing unneeded memory allocation)

This is a common multiplication that is done. The problem is, if you multiply by 0.x then it is casted to an int (and before to a number object), so you multiply by 0 and then the result is 0. You normally don't expect that (and it is causing unneeded memory allocation)
@elect86 elect86 merged commit 5ac4fba into master May 17, 2024
2 checks passed
@elect86
Copy link
Collaborator

elect86 commented May 17, 2024

It makes sense, thanks

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