Hello, I have one small problem.
I’m programming game with math sinus and cosinus function. First time I was tried to calculate it on my school calculator. For example when I calculated sinus of 90 degrees the result was 1. The same number is too in mathematical tables That’s what I need. But when I try the same thing in Defold or Lua compiler the result is other. For example when I write this code in Defold:
´´´math.sin(90)´´´
the result is -0.89399666360056!
What I have to do, when I want to work with code like with my calculator?
Thank you for every answer.
math.sin(math.rad(90))
Try this, you need radians for the sinus function.
3 Likes
Oh, thank you very much. It’s look like it works.
1 Like