Here you can find the source of gaussian(double x, double sigma)
public static double gaussian(double x, double sigma)
//package com.java2s; public class Main { public static double gaussian(double x, double sigma) { sigma = sigma * sigma;/*from w ww . j a v a2s .co m*/ return (1.0 / (2 * Math.PI * sigma)) * Math.exp(-x * x / (2 * sigma)); } }