Difference between revisions of "ConvertRating/Multiple"

From Sega Retro

Line 1: Line 1:
 
<includeonly><span style="display:none;"><!--"it'll be easier to work with without Mediawiki's loop syntax-->
 
<includeonly><span style="display:none;"><!--"it'll be easier to work with without Mediawiki's loop syntax-->
 +
 +
{{#ifeq:{{{1|}}}|gamepro|{{ConvertRating/GamePro|{{{2|}}}}}|
  
 
{{#vardefine:cumulativeDisplay|}}{{#vardefine:cumulativeScore|0}}{{#vardefine:numberOfScores|0}}
 
{{#vardefine:cumulativeDisplay|}}{{#vardefine:cumulativeScore|0}}{{#vardefine:numberOfScores|0}}
Line 52: Line 54:
  
 
{{#vardefine:displayRating|{{#var:cumulativeDisplay}}}}
 
{{#vardefine:displayRating|{{#var:cumulativeDisplay}}}}
{{#vardefine:score|{{#expr:{{#var:cumulativeScore}}/{{#var:numberOfScores}}}}}}</span></includeonly><noinclude>For when there are multiple ratings expected - convert each one and calculate an average.
+
{{#vardefine:score|{{#expr:{{#var:cumulativeScore}}/{{#var:numberOfScores}}}}}}
 +
}}</span></includeonly><noinclude>For when there are multiple ratings expected - convert each one and calculate an average.
  
 
{|class="prettytable" style="width:auto;"
 
{|class="prettytable" style="width:auto;"

Revision as of 09:32, 23 April 2020

For when there are multiple ratings expected - convert each one and calculate an average.

system input display score workings
0-10,0-10,0-10 1,2,3 1/10   2/10   3/10 20 (60, 3)
0-100,0-100,0-100,0-100 10,20,30,40 10%   20%   30%   40% 25 (100, 4)
A-F,A-F,A-F,A-F,A-F A,B,C,D,F A   B   C   D   F 50 (250, 5)