
local __meta_rng = {
	__index = {},
	__call = function(self, ...)
		return ((self.rng:next() / 2147483647 + 1) / 0.5) % 1
	end,
}

---Returns a PcgRandom wrapped in a function which returns 0.0 < n < 1.0
---@param seed any
function ExtraClasses.get_rng(seed)
	local o = setmetatable({}, __meta_rng)
	o.rand = PcgRandom(core.get_mapgen_setting("seed"), seed)
	return o
end
