So according to GM Studio, "tan(45)" returns the amount of 1.62 when its supposed to return the result of 1. Is this a bug or have I neglected a common issue :S
Mathematical Functions Need Fixing
Started by leopardio1, Jun 12 2012 07:58 PM
3 replies to this topic
#1
Posted 12 June 2012 - 07:58 PM
#2
Posted 12 June 2012 - 08:13 PM
I'm pretty sure that the trigonometric functions take angles measured in radians. Try "tan(pi/4)".
#3
Posted 12 June 2012 - 08:35 PM
I'm pretty sure that the trigonometric functions take angles measured in radians. Try "tan(pi/4)".
gave a result of 1. so does that mean i should convert my degrees to radians before i input them into the tan function?
#4
Posted 12 June 2012 - 08:50 PM
I'm pretty sure that the trigonometric functions take angles measured in radians. Try "tan(pi/4)".
gave a result of 1. so does that mean i should convert my degrees to radians before i input them into the tan function?
That's correct. Luckily, there's a function to do that for you. Your code would look something like:
variable = tan(degtorad(45));
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users











