Module:Sandbox/Lemondoge/NormalDist

local p = {} local b = require('Module:Random').number -- Module:Random has randomized seeds, which we need

function p.main(frame) local mean = frame.args["mean"] or frame.args[1] or 1 local stdDev = frame.args["standardDeviation"] or frame.args["stdDev"] or frame.args[2] or 1 return mean + math.sqrt(-2 * math.log(b({}))) * math.cos(2 * math.pi * b({})) * stdDev end

return p