kotlin-graphics / glm

jvm glm
122 stars 20 forks source link

Vec2::times(Float) #44

Closed Bixilon closed 1 month ago

Bixilon commented 1 month ago

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 commented 1 month ago

It makes sense, thanks