Skip to content
ExamplesOpen editor ↗

dikolosaMola

Rotates a vector in the x-y plane.

dikolosaMola(mola, sekhutlo)

Mutates and returns the first vector. Use 2D vectors. Vectors created with bopaMola follow the current seeloSaSekhutlo; vectors from molaWaSekhutlo or molaOpe use radians. This changes the vector, not the canvas transform.

NameTypeDescription
molamolaThe vector to change.
sekhutlopaloRotation angle in the vector’s angle units.
Rotates a vector in the x-y plane
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  seeloSaSekhutlo(DEGREES);
  diri lebelo = bopaMola(100, 0);
  dikolosaMola(lebelo, 60);
  thalaMothalo(100, 50, 100 + lebelo.x, 50 + lebelo.y);
  emisaPoapoeletso();
}

molaWaSekhutlo, seeloSaSekhutlo, dikolosa