Skip to content

fometaPaloLetshwao

Works like fometaPalo, but puts a "+" or "-" sign in front.

By default a number above 0 carries no sign. fometaPaloLetshwao puts one in explicitly, so that numbers above and below 0 line up at the same width.

  • fometaPaloLetshwao(123.45) is "+123.45"
  • fometaPaloLetshwao(-6.78) is "-6.78"
  • fometaPaloLetshwao(123.45, 4) is "+0123.45"
  • fometaPaloLetshwao(123.45, 4, 1) is "+0123.5"

The padding numbers behave exactly as in fometaPalo. When you want a space instead of a "+", use fometaPaloSebaka.

Given a list, it returns a list of strings.

fometaPaloLetshwao(boleng, kwaPele, kwaMorago)
NameTypeDescription
bolengpaloThe number to format. A list of numbers is also accepted.
kwaPele (optional)paloHow many digits to keep before the point.
kwaMorago (optional)paloHow many digits to keep after the point.
The step away from the middle of the canvas
tiro setaLoeto() {
  thalaKanefase(400, 400);
}

tiro tshwantsha() {
  bokamorago(220);
  tlogelaMothalo();

  diri boleng = pebaX - 200;
  kwala(fometaPaloLetshwao(boleng));

  tlatsaMmala(0, 150, 190);
  kgolokwe(200 + boleng / 2, 200, 90);
}

fometaPalo, fometaPaloSebaka, fometaPaloPhegelwana