Help with math.rad and math.deg

Hello, could someone explain to me what it is for math.rad and math.deg I have looked for information and I have learned all the math functions but these two cannot be understood, someone could explain them to me, please :frowning:

Code:

print (math.rad()) -- I do not understand what it does or what it is for
print (math.deg()) -- I do not understand what it does or what it is for
3 Likes

math.deg(X) returns X as if it was radians, so returns X in degree conversion
example;
math.deg(math.pi) – pi
math.rad(180) – pi

math.rad() does the same, returns degrees converted in radias

2 Likes

math.deg: turns angle from radians to degrees
math.rad: turns angle from degrees to radians

5 Likes

I think what I can’t understand is what is a radian and what’s a degrees … I’m so confused :frowning:

1 Like

Radians: It is the part of a circle where the radius is equal to the arc of the circle.

As if it were a square in a rectangle.

image

Degrees: They are in the angles, I don’t know how to explain it xd

image

Formula:
image

10 Likes

in spanish: Muchisimas gracias @SOTR654 ! :smiley: ahora entiendo esta cosa tan compleja xD gracias :smiley:

2 Likes

You’re welcome, a pleasure to help you ^ - ^

2 Likes