Skip to content
ExamplesOpen editor ↗

bokgakala

→ mag()

Returns the length from the point 0, 0 to the point you give.

bokgakala(x, y)

bokgakala(x, y) returns the length of the straight line from the point (0, 0) to (x, y).

It is sekgala(0, 0, x, y) said another way — but when the first point is (0, 0), bokgakala reads more plainly.

bokgakala(3, 4) is 5.

It earns its place when you work with movement: given a step in x and a step in y, bokgakala gives you the whole speed, whichever way it points.

NameTypeDescription
xpaloThe x amount.
ypaloThe y amount.
A length shown as colour
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(22, 26, 36);
  boketeMothalo(2);

  gopheta (diri i = 0; i < 26; i = i + 1) {
    metlha x = magareng(10, 380, selekanyo(i, 0, 25));
    metlha y = magareng(380, 10, selekanyo(i, 0, 25));

    metlha kgakala = bokgakala(x, y);

    mothaloMmala(lekanyetsa(kgakala, 0, 540, 60, 255), 150, 210);
    thalaMothalo(0, 400, x, y);
  }
}

sekgala, selekanyo, lekanyetsa