Skip to content
ExamplesOpen editor ↗

bayaBoleeleJwaMola

Sets a vector’s magnitude.

bayaBoleeleJwaMola(mola, boleeleJoBosha)

Changes the magnitude while preserving direction. Supply a nonnegative length. A zero vector remains zero because it has no direction. Mutates and returns the first vector.

NameTypeDescription
molamolaThe vector to change.
boleeleJoBoshapaloA nonnegative magnitude.
Sets a vector’s magnitude
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri lebelo = bopaMola(150, 90);
  bayaBoleeleJwaMola(lebelo, 90);
  thalaMothalo(40, 40, 40 + lebelo.x, 40 + lebelo.y);
  thalaSediko(40 + lebelo.x, 40 + lebelo.y, 12);
  emisaPoapoeletso();
}

boleeleJwaMola, atisaMola