I'm having a small problem with doing calculations with the sin(), cos(), and tan() functions. When I output the value of sin(45), I expect that I get the value of 0.70710678118654752440084436210485, but I get something else. Same is with the tan() and cos() functions. Either I'm not using the right type of functions or I'm supposed to convert some numbers to radians, or something.
What is it?
You have to convert to radians first. To do that, you just need to multiply the number by M_PI / 180.