What are the diferences between math.asin and math.rad?

hi, sorry this is an easy question ( I’m bad at Angles) what are the diferences beetwen math.asin and math.rad? And what is used to make from a number a angle?

rad converts numbers from their degree angle value into their radian angle value:

print(math.rad(180)) --> 3.1415926... (pi)

asin is the arcsine or inverse sine:

print(math.asin(1)) --> 1.5707... (pi/2)

Also note that the domain of arcsine is [-1, 1], so it doesn’t hurt to clamp your input values to prevent errors:

math.asin(math.clamp(x, -1, 1))
5 Likes

oh, i think i will use math.rad at degrees