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.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
x (optional) | palo | x component; defaults to 0. |
y (optional) | palo | y component; defaults to 0. |
z (optional) | palo | z component; defaults to 0. |
Examples
Section titled “Examples”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();
}