Radians (angle)

2026/04/07

Type
Learning Resource
Format
Glossary Article
Version
General
Subject Tags
Code
MIT
Game Assets
2016-2026, GDQuest© - All rights reserved
All else
2016-2026, GDQuest© - All rights reserved
Created
2026/06/06
Updated
2026/04/07

Radians (angle)

We use two units in games for measuring angles: degrees and radians. In games and game engines, angles are usually measured in radians for efficiency.

You surely know what degrees are, but you may not be familiar with radians. However, they're just another unit of measurements. You're familiar with kilograms vs pounds, meters vs feet, degrees celsius vs farenheit; degrees vs radians is another example of different units expressing the same thing.

Degrees are based on the circumference of a circle. A circle is divided into 360 degrees.

Radians are based on the radius of a circle. A radian is equal to the angle of an arc whose length is the circle's radius.

Imagine a circle with a radius of one unit.

Drawing of a circle with a radius of 1 unit

If you wrap a string along the circle that is one unit long, the corresponding angle from the circle center is one radian.

Drawing of the same circle as above, with an arc drawn along the circle and a cone from the circle center representing 1 radian

Because the perimeter of a circle is 2π multiplied by the circle radius, and one radian corresponds to an arc as long as the radius of the circle, there are 2π radians in a circle.

You don't have to remember the technical explanation; the important part to remember is that

So to get, say, a 90° angle, you can divide π by 2. Once you get used to thinking of angles as fractions of circles, things get easier.

Here are common angles in degrees and radians:

If you prefer to use the number, you can approximate values by remembering that PI is roughly equal to 3.14, and multiplying or dividing that. With this said, you very rarely need to write the float in full; using fractions is enough.

In Godot, the constant is called PI, so you can use operations like PI / 4 or 2 * PI to determine angles.

Godot also uses the TAU constant, equivalent to 2 * PI: a full circle. In Mathematics, Tau is noted as τ. If you wanted, for example, an angle that is 1/10th of a circle, you may write TAU / 10 or PI / 5.

Converting to and from radians

Because we have a better intuitive feel for degrees, due to years of familiarity, you may prefer to use degrees. There are several ways of doing that in Godot.

First, you can use the functions deg_to_rad() and rad_to_deg() to convert to and from degrees and radians in code.

Second, many functions related to rotation, which by default use gradients, have a ..._degrees equivalent. For example, to rotate a Node2D 180°, you may write node.rotation = PI, but you may also write node.rotation_degrees = 180. Check the documentation to see if there's an equivalent for the property or function you're setting that uses degrees.

Finally, you can export radians as degrees, so you can set degrees in the inspector, but still use radians in code:

@export_range(0, 360, 0.1, "radians_as_degrees") var angle: float

This property will appear as degrees in your editor, and will allow to enter values from 0 to 360. But in code, the value will be radians, and you can use it as is in all properties and functions that expect radians.

Why do we use radians at all?

One reason is that it makes calculations related to angles and such simpler. Trigonometric formulas get simplified when using radians, which is faster for the CPU. The difference is extremely small, so you shouldn't care about it in your own code. However, when choosing a default for a game engine, picking the faster option, even if by a hair, makes sense.

The simplified formulas are also easier to read and to write, which makes calculating them less prone to errors when writing code.

It's also tradition: even if you didn't care about the above, almost all mathematical libraries will use radians by default.

Become an Indie Gamedev with GDQuest!

Don't stop here. Step-by-step tutorials are fun but they only take you so far.

Try one of our proven study programs to become an independent Gamedev truly capable of realizing the games you’ve always wanted to make.

Nathan

Founder and teacher at GDQuest
  • Starter Kit
  • Learn Gamedev from Zero
Check out GDSchool

You're welcome in our little community

Get help from peers and pros on GDQuest's Discord server!

20,000 membersJoin Server

Contribute to GDQuest's Free Library

There are multiple ways you can join our effort to create free and open source gamedev resources that are accessible to everyone!

Site in BETA!found a bug?