Module:DepthCalculator

From Feed The Beast Wiki
Jump to: navigation, search

Documentation for this module may be created at Module:DepthCalculator/doc

local p = {}

function p.depth(params)
	local pages, articles = mw.site.stats.pages, mw.site.stats.articles
	return tostring((mw.site.stats.edits / pages) * (((pages - articles) / articles) ^ 2))
end

function p.balancedDepth(params)
	local pages, articles = mw.site.stats.pages - mw.site.stats.files, mw.site.stats.articles
	return tostring((mw.site.stats.edits / pages) * (((pages - articles) / articles) ^ 2))
end

return p