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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mola | mola | The vector to change. |
sekhutlo | palo | Rotation angle in the vector’s angle units. |
Examples
Section titled “Examples”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();
}