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.

P#70530 2019-12-03 14:23 ( Edited 2019-12-03 14:38)

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.

P#70532 2019-12-03 14:47

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-03-29 13:55:18 | 0.004s | Q:11