Jump to content

Template:One In X: Difference between revisions

From RiskiPedia
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
This is the "One in X" template. It uses the Parser Function extension functions to convert a floating point number into a user-friendly "x in ten / hundred / thousand / etc"
This is the "One in X" template. It uses the Parser Function extension functions to convert a floating point number into a user-friendly "x in ten / hundred / thousand / etc"
</noinclude><includeonly>{{ifexpr: {{1}} = 0 | zero (no chance) |
</noinclude><includeonly>{{ifexpr: {{{1}}} = 0 | zero (no chance) |
   {{#ifexpr: {{{1}}} < 1e-6 | less than one in a million |  
   {{#ifexpr: {{{1}}} < 1e-6 | less than one in a million |  
   {{#ifexpr: {{{1}}} < 1e-3 | {{#expr: {{{1}}}*1e6 round 0}} in a million |
   {{#ifexpr: {{{1}}} < 1e-3 | {{#expr: {{{1}}}*1e6 round 0}} in a million |

Revision as of 15:13, 30 August 2025

This is the "One in X" template. It uses the Parser Function extension functions to convert a floating point number into a user-friendly "x in ten / hundred / thousand / etc"