ထႅမ်းပလဵတ်ႉ:Roundup
This template rounds up a numeric value to a limited number of decimal places.
လွင်ႈၸႂ်ႉတိုဝ်း
မႄးထတ်း{{Roundup|
value}}
{{Roundup|
value|
decimals}}
- Both parameters can be any valid numeric expression; however, decimals should be an integer.
- The decimals parameter defaults to 0.
- decimals can be negative to round up to a multiple of a power of ten.
- NAN may be returned if very large values are used.
တူဝ်ယၢင်ႇ
မႄးထတ်းTemplate | Result | Expected |
---|---|---|
{{Roundup|3.14159|3}}
|
3.142 | 3.142 |
{{Roundup|0|3}}
|
0 | 0 |
{{Roundup|-0.00031|3}}
|
0 | 0 |
{{Roundup|-3.14159|3}}
|
-3.141 | -3.141 |
{{Roundup|0|0}}
|
0 | 0 |
{{Roundup|-0.9|0}}
|
0 | 0 |
{{Roundup|314159|-3}}
|
315000 | 315000 |
{{Roundup|0|-3}}
|
0 | 0 |
{{Roundup|-514.15|-3}}
|
0 | 0 |
{{Roundup|-514159|-3}}
|
-514000 | -514000 |
{{Roundup|1}}
|
1 | 1 |
ၶေႃႈမၢႆတွင်း
မႄးထတ်း- You should use the parserfunction
{{#expr:ceil
value}}
rather than{{Roundup|
value}}
or{{Roundup|
value|0}}
. This template should only be used to round up to a number of decimal places other than zero.
တူၺ်းပႃး
မႄးထတ်းၽိုၼ်ၵႅမ်မိုဝ်းလၢႆးၸႂ်ႉတိုဝ်း (documentation)တီႈၽၢႆႇၼိူဝ်ၼႆႉ လုၵ်ႉတီႈ ထႅမ်းပလဵတ်ႉ:Roundup/doc သေ ၶၢႆႉသႂ်ႇၶဝ်ႈ (ႁဵတ်း transclude ဝႆႉၶႃႈဢေႃႈ။ (မႄးထတ်း | ပိုၼ်း) ၽူႈၸိူဝ်းမႄးထတ်းၶဝ် ၸၢင်ႈၸၢမ်းတူၺ်းလႆႈ ၸိူဝ်းပဵၼ်ၼႃႈလိၵ်ႈ sandbox (သၢင်ႈ | ငဝ်းမိူၼ်) လႄႈ testcases (သၢင်ႈ) ႁင်း ထႅမ်းပလဵတ်ႉဢၼ်ၼႆႉ လႆႈယူႇၶႃႈ။ သႂ်ႇပိူင်ထၢၼ်ႈ ၵႃႈတီႈ ၼႃႈလိၵ်ႈၽႄ /doc လႄႈ။ ၼႃႈလိၵ်ႈၽႄ ႁင်း ထႅမ်းပလဵတ်ႉ ဢၼ်ၼႆႉ။. |