Here you can find the source of gaussian(double t)
Parameter | Description |
---|---|
t | = A value, 0 to 1, representing a percent along the curve |
private static double gaussian(double t)
//package com.java2s; //License from project: Open Source License public class Main { /**//w w w . jav a 2 s. c o m * Satisfies Integral[gaussian(t),t,0,1] == 1D Therefore can distribute a * value as a bell curve over the intervel 0 to 1 * * @param t = A value, 0 to 1, representing a percent along the curve * * @return The value of the gaussian curve at this position */ private static double gaussian(double t) { t = 10D * t - 5D; return 1D / (Math.sqrt(5D) * Math.sqrt(2D * Math.PI)) * Math.exp(-t * t / 20D); } }