I have trying to figure out how to use math.atan(), which I assumed would the inverse of tangent or tan^-1(). However, the numbers they are returning don't seem to what the right answers.
In degree mode in my calculator tan^-1(1) returns 45, so the inverse tangent of 1 is 45 degrees. In radian mode in my calculator tan^-1(1) returns 0.78539.
However, whenever I try to do the same thing on Roblox, it doesn't seem to work at all?
print(math.tan(math.rad(45))) --Equivalent to putting tan(45) in degree mode on a calculator.
local tan = math.atan(1) --This returns 0.7853, which is what you get when you input tan^-1(1) on radian mode.
print(tan)
local otherTan = math.atan(math.rad(1)) --Returns 0.01745 for some reason.
print(otherTan)
My question is, how am I suppose to get it to return 45 degrees like it is supposed to?
