[SOLVED] Sinus, Cosinus and Tangent functions do not work

Hey guys!

I recently started using sin(), cos() and tan() functions for my game. On their website it says that the software supports them and I was hyped because this is exactly what I needed, but now I’ve run into a problem.

For anyone who is not up-to-date on their eight grade trigonometry (like I was), what sin(), cos() and tan() are supposed to do is output a number between 0 and 1, based on an angle (from 0° to 90°). Now here’s the issue: No matter what value I enter, no matter how tame or special the angle is, the output is always just random gibberish. Rarely it’s within 0 - 1, sometimes it’s even negative (that’s NOT how it works). I even created a variable that just slowly ticks up in increments of 1 (from 0 - 90, to simulate different angle values) and visualised its sin() and cos() values, only to watch them spike out of control. Using the angle symbol ° also doesn’t work - in that case it just doesn’t output anything.

I have genuinely 0 clue what causes this or what math the program is running, but it ain’t working. I really do not want to add a workaround by storing all sin() values as their own variable… can anyone help me on this? Thank you in advance!

EDIT / SOLUTION: Lmao I got it! You have to convert degrees to radians, it even says it on their site! I’m just gonna leave this up in case someone is gonna be a dummy like me!! Sorry guys!

1 Like