Skip to content
ExamplesOpen editor ↗

palopotlana

→ min()

Returns the smallest of the numbers it is given.

palopotlana(palo0, palo1)

palopotlana(3, 9) is 3. You may give it more than two numbers: palopotlana(8, 2, 5) is 2.

You may also give a single list instead of separate numbers: palopotlana(dibogolo) returns the smallest number in the list.

palopotlana(palo, 100) stops a number going past 100 — a single upper limit. When you want both limits, use thibela.

palopotlana and palokgolo can be used together to hold a value between limits, but thibela(b, tlase, godimo) says the same thing more plainly.

NameTypeDescription
palo0paloThe first number to compare. A list of numbers may be given instead.
palo1 (optional)paloThe second number to compare. Further numbers may follow.
A size that cannot grow past its limit
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(243);
  tlogelaMothalo();

  gopheta (diri i = 0; i < 14; i = i + 1) {
    // Bogolo bo a gola, mme ga bo fete 60
    metlha bogolwane = palopotlana(8 + i * 9, 60);

    tlatsaMmala(230 - i * 10, 110 + i * 8, 90 + i * 10);
    thalaSediko(40 + i * 25, 200, bogolwane);
  }
}
Both limits, with palopotlana and palokgolo
tiro setaLoeto() {
  thalaKanefase(400, 400);
  bokamorago(20, 25, 35);
  tlogelaMothalo();

  paloEpePeo(3);

  gopheta (diri i = 0; i < 60; i = i + 1) {
    diri x = paloEpe(-100, 500);
    diri y = paloEpe(-100, 500);

    // Tshwara ntlha mo kanefaseng: ga e fete 380, ga e wele kwa tlase ga 20
    x = palopotlana(palokgolo(x, 20), 380);
    y = palopotlana(palokgolo(y, 20), 380);

    tlatsaMmala(90, 190, 230);
    thalaSediko(x, y, 14);
  }
}

palokgolo, thibela, bokgakalaPalo, lekanyetsa