magarengMela
Interpolates vector components.
magarengMela(mola, oMongwe, seelo)Mutates and returns the first vector by interpolating its x, y and z components toward the second. Amount 0 keeps the start; 1 reaches the destination. Values outside 0–1 extrapolate. 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 = magarengMela(a, b, 0.5);
atisaMola(sephetho, 20);
thalaMothalo(90, 60, 90 + sephetho.x, 60 + sephetho.y);
emisaPoapoeletso();
}