Skip to main content
The Deno 2 Release Candidate is here
Learn more
method RandomUtil.prototype.getNormallyDistributedRandomNumber
import { RandomUtil } from "https://deno.land/x/sptaki@1.2.0/utils/RandomUtil.d.ts";

Generate a normally distributed random number Uses the Box-Muller transform

Parameters

mean: number

Mean of the normal distribution

sigma: number

Standard deviation of the normal distribution

optional
attempt: number

Returns

number

The value drawn