Skip to content

Instantly share code, notes, and snippets.

@Dafrok
Created November 19, 2015 09:31
Show Gist options
  • Select an option

  • Save Dafrok/49f7344917548e98bca8 to your computer and use it in GitHub Desktop.

Select an option

Save Dafrok/49f7344917548e98bca8 to your computer and use it in GitHub Desktop.
Gaussian
Math.Gaussian = function (x, mu, sigma) {
return (1 / (Math.sqrt(2 * Math.PI) * sigma)) * Math.pow(Math.E, -Math.pow(x - mu, 2) / 2 * Math.pow(sigma, 2));
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment