I've spent the last 5 hours trying to debug this darn thing . . . basically I want to store a float variable after doing some math, but it only stores as an int.
Programming in C with gcc, for Axon.
This below code either prints out +1.00000 if j=0 or +0.00000 for any other j value no greater than speed.
And this below code only prints out +0.50000 no matter what, which makes sense.
So the question is, what am I doing wrong in the first code example? I want it to give me a float value, not round it down as if it was an int variable . . .
Also, I tried this and various versions of it:
but always get this error:
error: expected expression before 'float'