I have encountered a very strange bug lately. The problem is that a simple
math.asin()
function doesn’t return the expected value.
For example, calculating the arc sine of 1 in studio gives for me 1.57… which is completely wrong, correct answer would be 90, try on a calculator yourself.
I fear that this is a studio bug, so I would be really glad if someone could test it out this simple line of code in studio and tell me what output you get.
Roblox, and most software internally, use radians for storing angle data in memory. As it turns out 1.57 radians (pi / 2) is 90 degrees. If you would like to display the calculated angle in degrees you can use math library functions to convert: