kotlin-graphics / glm

jvm glm
129 stars 21 forks source link

Vec2::times(Float) #44

Closed Bixilon closed 6 months ago

Bixilon commented 6 months 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 6 months ago

It makes sense, thanks