luxeengine / alpha

alpha - deprecated 2015~2016. unrelated to the new engine! view the new engine here - https://luxeengine.com/
MIT License
565 stars 74 forks source link

Collision; remove unnessesary Vector allocations in ShapeCollision.hx #331

Closed NicoM1 closed 8 years ago

NicoM1 commented 9 years ago

Saves 2 unnecessary Vector allocations for every collision, could also be left in and instead have the SAT2D class use setxy on them, but this was faster for me to create the pull as some of the test() functions use temp vectors and such.

I know there are many optimizations that could be done on the Collision classes (the amount of vectors created is staggering) and that optimization is not your priority currently, but this is a pretty innocent way to save a sizeable amount of allocations with a very tiny change (that does not affect API)

Nico

ruby0x1 commented 8 years ago

This has been address in differ and will be upstreamed to luxe.collision pretty soon.