The following is part of an ongoing series of basic tutorials for gameplay scripters. Note also that this symbol - Π is Pi, but the font this site is using makes it look a little odd in my opinion.
Radians are a subject that confuses some when the first start programming, and because of this they are often avoided. However, they are a very simple concept that can be extremely useful when understood. Not to mention that many libraries provide functions that return radian values, so it’s important to know how to work with them.
Ultimately they are most useful to us when using trigonometric functions which make up our mathematical bread and butter as gameplay scripters.
The basics
Radians are the standard units for measuring angles. There are 2 Π radians in one circle. In other words there are just over 6 radians in the angle of a circle. If you trace along the edge of a circle the length of its radius and mark the start and end points - the angle between those points is one radian.
Conversion
We know that 2 Π radians = 360 degrees. So we know that Π radians = 180 degrees. We can then of course see that 1 radian is equal to 180 degrees / Π and this is what we use to convert the values between degrees and radians.
Radians to Degrees
Sudocode
ourRadianValue * (180 / Π)
Unity C#
ourRadianValue * Mathf.Rad2Deg
Degrees to Radians
Sudocode
ourDegreeValue / (180 / Π)
But because multiplication is less expensive and safer when programming we instead use:
ourDegreeValue * (Π / 180)
Unity C#
ourRadianValue * Mathf.Deg2Rad