Log In  


So, this is the code I have right now:

local count = 0
function _draw()
 count += 1
 print(count)
 print(sin(count))

Then, when I boot this, the second one is always 0, but why? I'm trying to have a sinus wave, but not 0.



3

sin() uses a range of 0.0-1.0. Therefore, sin(0) and sin(1) are both 0. Try increasing count by smaller increments instead.



[Please log in to post a comment]