RADIANS
A value that tells p5 to measure turning in radians —
PEDI_PIin a full circle.
This is the unit p5 uses by default. In this unit no conversion is needed — the number is already in radians, so SEPHATLO_PI is a 90˚ turn on its own. The name is left in English, just like DEGREES and PI.
Syntax
Section titled “Syntax”RADIANSExamples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(400, 400);
bokamorago(220);
diri seelo = RADIANS;
diri tekanyo = SEPHATLO_PI;
diri boleng = tekanyo;
// Ntlha e ga e tsenwe, ka gonne seelo ke RADIANS
fa (seelo === DEGREES) {
boleng = tekanyo * PI / 180;
}
tlatsaMmala(200, 120, 70);
kgolokwe(bophara / 2, boleele / 2, boleng * 100);
}