Learning and Applying Mathematics using Computing

Degrees and Radians

There are 360 degrees in a circle. But there’s no particularly good reason for this. It’s just an arbitrary scale. Whenever people have some total number to divide up, they tend to pick convenient maximums. So probabilities are zero to one, “star” ratings are out of five, percentages are out of 100, and so on. These choices are all arbitrary, usually designed to make our lives a bit easier by simplifying recognition or the ensuing calculations (being out of 100 is much easier for us to reason with than, say, being out of 57 — and making probabilities out of 1 makes calculations very much easier).

So why 360 degrees? If you think about it, being out of 100 might have made life easier, or we could have used 0 to 1. 360 is an arbitrary choice. It turns out that there is a number that makes some angle-related calculations much easier: having angles be from 0 \text{~--~} 2 \pi (aka tau: \tau). Now, this number is clearly harder for humans to get a feel for. If I tell you that the angle is 1.4, but that a full circle is roughly 6.28, it will take you a few moments (at least!) to realise that 1.4 is just under a quarter-circle. So we teach degrees at first, but for more advanced maths, this other system of 0 \text{~--~} 2 \pi aka 0 \text{~--~} \tau (known as radians), makes much more sense.

When computers (and calculators) get involved, it gets tricky again. If you create a sin() function, you must decide whether it treats its parameter as degrees or radians. Most programming systems that supply sin() directly, use radians. But often systems like Greenfoot (when using its setRotation()/getRotation() system) and Scratch use degrees when dealing with rotations, because they target people who might not be comfortable with Radians. This is compounded a bit in Greenfoot because you can get access to Java’s maths libraries, which do use radians! The moral of the story is really this: whenever you deal with angles in programming, always check the documentation to see if the function expects radians or degrees. Similarly, whenever you use a calculator (or calculator program/app) for these things, also check if it’s in degrees or radians: a quick check is that sine of 90 degrees should equal 1, so if sin(90) comes out as something else, it is treating the 90 as radians.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s