ವಿಕಿಪೀಡಿಯದಿಂದ, ಇದು ಮುಕ್ತ ಹಾಗೂ ಸ್ವತಂತ್ರ ವಿಶ್ವಕೋಶ
Template documentation Usage
{{percentage | numerator | denominator | decimals to round to (zero or greater) }}
Examples
- {{Percentage | 1 | 3 | 0 }} yields 7001330000000000000♠೩೩%
- {{Percentage | 1 | 3 | 2 }} yields 7001333300000000000♠೩೩.೩೩%
Negative values can be used:
- {{Percentage | -1 | 3 }} yields 2998670000000000000−೩೩%
Nornal operation is to cut off all decimal zeroes from right in rounding:
- {{Percentage | 1 | 5 | 2 }} yields 7001200000000000000♠೨೦%
- {{Percentage | 1111 | 10000 | 4 }} yields 7001111100000000000♠೧೧.೧೧%
Add |pad=yes
to always get as many deciamls as specified, padding with zeroes where needed:
- {{Percentage | 1 | 5 | 2 | pad=yes }} yields 7001200000000000000♠೨೦.೦೦%
- {{Percentage | 1111 | 10000 | 4 | pad=yes }} yields 7001111100000000000♠೧೧.೧೧೦೦%
Third parameter can also be given through |pad=N
:
- {{Percentage | 111 | 1000 | pad=4 }} is same as {{Percentage | 111 | 1000 | 4 | pad=yes }} and yields 7001111000000000000♠೧೧.೧೦೦೦%
Default denominator is 100:
- {{Percentage | 20 }} yields 7001200000000000000♠೨೦%
Default precision is zero:
- {{Percentage | 1 | 3 }} yields 7001330000000000000♠೩೩%
Aliases
See also
ವರ್ಗಗಳು:
- Pages with non-numeric formatnum arguments
- Mathematical function templates