Skip to content
ExamplesOpen editor ↗

RADIANS

→ RADIANS

A value that makes turning be measured in radians — `PEDI_PI` in a full circle.

RADIANS

This is the unit used by default, so you never have to ask for it. In this unit a full turn is PEDI_PI (about 6.28), and a quarter turn is SEPHATLO_PI.

You hand it to seeloSaSekhutlo to return to the default after using DEGREES. The name is left in English, just like DEGREES and PI — and “radian” has no Setswana word in any source, nor does it appear in the BGCSE mathematics syllabus at all.

Going back to the default unit
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(220);
  tlogelaMothalo();

  // Sediko sa ntlha, se balwa ka dikirii
  seeloSaSekhutlo(DEGREES);
  gopheta (diri s = 0; s < 360; s = s + 30) {
    tlatsaMmala(230, 140, 80);
    thalaSediko(130 + cos(s) * 70, 200 + sin(s) * 70, 18);
  }

  // Boela mo seelong sa tlwaelo — jaanong go dikologa ke PEDI_PI
  seeloSaSekhutlo(RADIANS);
  kwala(seeloSaSekhutlo());

  gopheta (diri i = 0; i < 12; i = i + 1) {
    metlha s = selekanyo(i, 0, 12) * PEDI_PI;
    tlatsaMmala(70, 150, 220);
    thalaSediko(285 + cos(s) * 70, 200 + sin(s) * 70, 18);
  }
}

DEGREES, seeloSaSekhutlo, radians, PEDI_PI