Skip to content
ExamplesOpen editor ↗

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.

NameTypeDescription
molamolaThe first vector.
oMongwemolaThe second vector.
seelopaloInterpolation amount; 0 is the start and 1 is the end.
Interpolates vector components
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();
}

bopaMola, kopololaMola