The math.sin()
function calculates the sine of an angle given in radians.
math.sin(x)
x |
The angle whose sine we want in radians. |
This function returns the trigonometric sine of x
.
If the angle is in degrees, you should always convert it to radians before passing it to sin()
function. As shown above, this can be achieved by using math.radians function which converts an angle in degrees into radians.