Difference between revisions of "ConvertRating/Single"

From Sega Retro

Line 25: Line 25:
  
 
|1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}}
 
|1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:({{#var:value}}-1)*20}}}}
 +
 +
|-1-6={{#vardefine:displayRating|{{#var:value}}/6}}{{#vardefine:score|{{#expr:100-(({{#var:value}}-1)*20)}}}}
  
 
|0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}}
 
|0-7={{#vardefine:displayRating|{{#var:value}}/7}}{{#vardefine:score|{{#expr:{{#var:value}}*(100/7)}}}}

Revision as of 10:57, 14 May 2021

Rating conversion code for when there's only one value - stops Mediawiki from complaining about recursion.