Difference between revisions of "ConvertRating/Single"

From Sega Retro

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

Revision as of 09:27, 27 July 2021

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