magarengMelaKaSekhutlo
Interpolates vector direction and magnitude.
magarengMelaKaSekhutlo(mola, oMongwe, seelo)Mutates and returns the first vector, interpolating direction along an arc and magnitude along a straight scale. Amount 0 keeps the start; 1 reaches the destination. Zero-length inputs use component interpolation. The second vector is unchanged.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
mola | mola | The first vector. |
oMongwe | mola | The second vector. |
seelo | palo | Interpolation amount; 0 is the start and 1 is the end. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri a = bopaMola(3, 4);
diri b = bopaMola(5, 1);
diri sephetho = magarengMelaKaSekhutlo(a, b, 0.5);
atisaMola(sephetho, 20);
thalaMothalo(90, 60, 90 + sephetho.x, 60 + sephetho.y);
emisaPoapoeletso();
}