What is math.rad and math.deg

I searched the documentation about these functions but they really do not make sense to me is there someone who can teach me what math.rad means and math.deg in a intermediate to simple way.

There alot of tutorials in youtube about it, its not exclusive to roblox.

The functions aren’t anything special. Infact they are really basic. They are helpful functions related to doing math with radians, related to rotations, circles, and trigonometry.

1 Like

I just want to know because some people use for like custom camera controls and knockback when someone punches you etc, I just want to know I could use it

Cframe.Angles() uses radians instead of degrees so we use that math.rad() function to convert degrees into rads, its easier to read and removes need of calculating radians in our mind, good for those who doesn’t have much of math knowledge. its how we rotate things with cframe.

1 Like

I think I am starting to get it do have an example of a script that I could see

I recommend checking out CFrame’s documentation,

local part = workspace.Part

--Rotate part in X axis by 45 degrees
part.CFrame = part.CFrame * CFrame.fromEulerAngles(math.rad(45), 0, 0)
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.