List of usage examples for org.apache.commons.math3.analysis.function Gaussian Gaussian
public Gaussian()
From source file:com.velonuboso.made.core.common.MadePattern.java
public static double gaussian(double value, double target, double amplitude) { Gaussian g = new Gaussian(); return g.value(3 * (target - value) / amplitude); }
From source file:com.velonuboso.made.core.common.Helper.java
public static double getGaussian(float ratio, Float from, Float to) { Gaussian gaussian = new Gaussian(); if (from == null && to == null) { return 1; } else if (from == null) { from = 1 - to;/* www . jav a 2 s .c om*/ } else if (to == null) { to = 2 - from; } float target = (from + to) / 2f; float amplitude = to - from; return gaussian.value((ratio - target) / amplitude) / 0.40; }