gosu / ashton

Special graphical effects and other extensions for the Ruby/Gosu game library (⚠️ unmaintained)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Optimise fastcos/fastsin in particle engine.

bil-bas opened this issue · comments

Suggested by ker:

modulo is bad, rather use two while loops, one for <0 to += 360 and one for >360 to -= 360
especially modf is bad
convert to integer, the do the loops in integer
saves you both modf and %