All posts
A battle scene from a medieval illuminated manuscript.
TAU proponents announcing their newfound knowledge

TAU is two times better than PI

It is only natural to be confused. After all you were probably tought that PI is the circle constant. You might have not even heard of TAU. Fear not my friend for today's your lucky day. For today you learn that TAU is equal to PI times two which is approximately 6.2832. And tomorrow you will never use PI again.

Obviously just knowing the value of TAU doesn't help very much. What does is realizing what that value represents. TAU represents a full turn. And it does so in a very elegant way. You see, if you have a circle with a radius of 1 it's circumference is equal to exactly TAU.

At this point we ought to talk about radians. What a strange unit indeed. I used to find it very puzzling that such a unit would be used for angles so much. Like what angle is 1 radian? Or 2 radians? How can one use such a unit. Especially if someone (like Wikipedia) explains radians as being "defined such that one radian is the angle subtended at the center of a plane circle by an arc that is equal in length to the radius". Bleugh, no wonder people always convert from degrees to radians in code.

Let's change this definition. Radians represent distance travelled around a unit circle. Which means that 1 radian is exactly the distance of 1 around a unit circle (Coincidentally this is why radians have no unit - they are just distance). Which means TAU radians is the full turn around that unit circle! I hope you like that explanation, because using this knowledge we can finally start to reason about angles in radians and be happy doing so.

To get the basic thing out of the way, because TAU is a full turn converting from radians to degrees is trivial:

f32 degrees_to_radians(f32 degrees) {
  f32 turns = degrees / 360;
  return turns * TAU;
}

f32 radians_to_degrees(f32 radians) {
  f32 turns = radians / TAU;
  return turns * 360;
}

Next let's look at manually defining angles. Look how easy TAU makes defnining them, especially the angle the hour hand makes on the fifth hour. To me that would be a bit of a head scratcher with PI and it would be equally hard with degrees.

f32 half_turn    = TAU / 2;
f32 quarter_turn = TAU / 4;
f32 fifth_hour   = TAU * 5 / 12;

TAU is also exceptional for laying things around in a circle:

for (i32 i = 0; i < N; i++) {
  printf("angle: %g\n", (f32)i * TAU / N);
}

And to just state the obvious, because all the trigonometric functions like sin, cos or our beloved atan2 work with radians which means they'll happily take TAU and roll with it.

I sincerely hope I convinced you, but if you are still skeptical or you'd like to do some more reading on the theory behind TAU you should definitely read The TAU Manifesto.