Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SIN and COS functions have bug ?
#1
Hello to the zx basic community. I'm integrating the compiler into my own spectrum bot.

I created a sample sinewave graph
Code:
FOR x = 10 TO 245 STEP 2
  PLOT x,100+SIN(2*x*PI/180)*50
NEXT x

However I see the values jump around 90 deg, see video here

https://twitter.com/ZxSpectrumBot1/statu...twCv438ECA

I cannot find any reference in the doc , it is supposed to be sinclair compatible, but in sinclair basic it works ok

https://twitter.com/ZxSpectrumBot1/statu...twCv438ECA

thanks a lot
Reply
#2
nevermind, declared x as float
dim x
Reply
#3
(08-17-2022, 12:44 AM)papa_robot Wrote: nevermind, declared x as float
dim x

Glad to see you catch it! Cool
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)