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.
Syntax
Section titled “Syntax”fometaPaloLetshwao(boleng, kwaPele, kwaMorago)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
boleng | palo | The number to format. A list of numbers is also accepted. |
kwaPele (optional) | palo | How many digits to keep before the point. |
kwaMorago (optional) | palo | How many digits to keep after the point. |
Examples
Section titled “Examples”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);
}