FANDOM


local utils = require('Module:Utils')
local userError = require('Dev:User error')
local getArgs = require('Dev:Arguments').getArgs
 
return {
    round_number = function(number, max_round, category, category_min)
		number = utils.parse_number(number, true) -- Guaranteed to return a number or error
		if max_round then
			-- Round the number.
			local power = 10^(#tostring(number) - 1)
			power = power > max_round and max_round or power
			number = math.ceil(number/power) * power
		end
		local formatted_number = utils.format_number(number)
		if category then
			if category_min then
				if number < category_min then
					return formatted_number-- .. categorize(category)
				else
					return formatted_number
				end
			else
				return formatted_number-- .. categorize(category)
			end
		else
			return formatted_number
		end
	end;
    }

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.