Skip to content
ExamplesOpen editor ↗

bopaMola

Creates a vector with magnitude and direction.

bopaMola([x], [y], [z])

A vector stores x, y and z components for positions, velocities or forces. Returns a new vector without drawing anything. Omitted components are 0. Read or write components as mola.x, mola.y and mola.z. Use standalone operations such as tlhakanyaMola(mola, oMongwe) to change a vector.

NameTypeDescription
x (optional)palox component; defaults to 0.
y (optional)paloy component; defaults to 0.
z (optional)paloz component; defaults to 0.
Creates a vector with magnitude and direction
tiro setaLoeto() {
  thalaKanefase(320, 220);
  bokamorago(235);
  diri boemo = bopaMola(120, 80);
  thalaMothalo(0, 0, boemo.x, boemo.y);
  thalaSediko(boemo.x, boemo.y, 12);
  emisaPoapoeletso();
}

tlhakanyaMola, boleeleJwaMola, molaWaSekhutlo