Template:Sandbox/Aurelain/HeroClassSkills/value: Difference between revisions

From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary
No edit summary
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!--
-->{{#expr: (100 * {{{1|0}}} / {{{2}}}) round 2 }}<!--
-->{{#if: {{{1|}}}|<!--
    --><span class="mw-collapsible" id="mw-customcollapsible-value"><!--
        -->{{#invoke:Sandbox/Aurelain/HeroClassSkills|percent|{{{1}}}|{{{2}}}}}%<!--
    --></span><!--
    --><span class="mw-collapsible mw-collapsed" id="mw-customcollapsible-value"><!--
        -->{{{1}}}<!--
    --></span><!--
-->}}<!--
--></includeonly><!--
--></includeonly><!--
################################################################################
################################################################################
--><noinclude>
--><noinclude>


Renders a number either as raw value or as percentage.
Renders a number either as percentage or as raw value.


<!--=========================================================================-->
<!--=========================================================================-->
==1. Normal:==
==1. Integer:==


{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|150|1000}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|150|1000}}</nowiki></code>
Line 15: Line 22:


<!--=========================================================================-->
<!--=========================================================================-->
==2. Value A:==
==2. Float 1:==


{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|123|1000}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|123|1000}}</nowiki></code>
Line 22: Line 29:


<!--=========================================================================-->
<!--=========================================================================-->
==3. Value B:==
==3. Float 2:==


{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|3|10}}</nowiki></code>
{{Color|yellow|Input:}} <code><nowiki>{{Sandbox/Aurelain/HeroClassSkills/value|3|9}}</nowiki></code>


{{Color|lime|Output:}} {{Sandbox/Aurelain/HeroClassSkills/value|123|1000}}
{{Color|lime|Output:}} {{Sandbox/Aurelain/HeroClassSkills/value|3|9}}


<!--=========================================================================-->
<!--=========================================================================-->

Latest revision as of 12:38, 8 August 2026


Renders a number either as percentage or as raw value.

1. Integer:

Input: {{Sandbox/Aurelain/HeroClassSkills/value|150|1000}}

Output: 15.00%150

2. Float 1:

Input: {{Sandbox/Aurelain/HeroClassSkills/value|123|1000}}

Output: 12.30%123

3. Float 2:

Input: {{Sandbox/Aurelain/HeroClassSkills/value|3|9}}

Output: 33.33%3

4. Invalid numerator:

Input: {{Sandbox/Aurelain/HeroClassSkills/value||1000}}

Output: