Degrees

A full rotation is split into 360 degrees (°). Familiar benchmarks:

  • 90° = quarter turn (right angle)
  • 180° = half turn (straight line)
  • 270° = three-quarter turn
  • 360° = full turn

Degrees are convenient for humans (divisible by 2, 3, 4, 6, 9, …), which is why CSS, SVG rotations, and compass bearings use them.

Radians

A radian measures rotation by arc length: one radian is the angle that subtends an arc exactly one radius long. Since a full circle’s circumference is \(2\pi r\):

$$ \text{full rotation} = 2\pi \text{ radians} \approx 6.2832 $$

Key equivalents to memorize:

Degrees Radians Decimal
\(0\) 0
30° \(\pi/6\) ≈ 0.5236
45° \(\pi/4\) ≈ 0.7854
60° \(\pi/3\) ≈ 1.0472
90° \(\pi/2\) ≈ 1.5708
180° \(\pi\) ≈ 3.1416
270° \(3\pi/2\) ≈ 4.7124
360° \(2\pi\) ≈ 6.2832

Conversion formulas

$$ \text{radians} = \text{degrees} \times \frac{\pi}{180}, \qquad \text{degrees} = \text{radians} \times \frac{180}{\pi} $$

In code, never hand-roll \(\pi\) — use the constant:

import math

def deg_to_rad(d): return d * math.pi / 180
def rad_to_deg(r): return r * 180 / math.pi

print(deg_to_rad(180))  # 3.141592653589793
print(rad_to_deg(math.pi / 2))  # 90.0
# Or just use the stdlib:
print(math.radians(45), math.degrees(math.pi / 4))
const degToRad = (d) => d * Math.PI / 180;
const radToDeg = (r) => r * 180 / Math.PI;

console.log(degToRad(180));  // 3.141592653589793
console.log(radToDeg(Math.PI / 2));  // 90

Why radians are the default in code

Math.sin / math.sin and friends take radians. Reasons:

  1. Calculus and series expansions only come out clean in radians (e.g. \(\sin x \approx x\) for small \(x\) holds in radians only).
  2. Arc-length math becomes trivial: \(\text{arc} = r\theta\), no conversion factor.
  3. Angular velocity is natural: \(\omega\) radians/second × \(t\) seconds = angle.

The #1 beginner bug is passing degrees into a radian function: Math.sin(90) is not 1 — it is Math.sin(90 radians) ≈ 0.894. Always convert first.

// WRONG: Math.sin(90) ≈ 0.894 (90 radians!)
// RIGHT:
console.log(Math.sin(degToRad(90))); // 1

Coterminal angles and negative angles

Adding or subtracting 360° (\(2\pi\)) gives the same direction. So 30°, 390°, and −330° are coterminal:

$$ \theta \equiv \theta + 360^\circ k = \theta + 2\pi k \quad (k \in \mathbb{Z}) $$

Negative angles mean clockwise rotation. Normalize any angle into \([0, 360)\) or \([0, 2\pi)\):

import math
def normalize_deg(d): return d % 360
def normalize_rad(r): return r % (2 * math.pi)
print(normalize_deg(-30))   # 330
print(normalize_deg(390))   # 30

Practice

  1. Convert 60°, 135°, 300° to radians by hand, then check with math.radians.
  2. Convert \(\pi/3\), \(5\pi/6\), \(3\pi/4\) to degrees.
  3. Evaluate math.sin(math.pi) — why is it 1.22e-16 instead of exactly 0? (Hint: floating-point.)
  4. A wheel spins at 2 rad/s. What angle (radians and degrees) has it turned after 3 s?

Next: Right-Triangle Trigonometry — SOH-CAH-TOA.