MCPcopy Create free account
hub / github.com/OpenSourcePhysics/osp / gaussian

Method gaussian

src/org/opensourcephysics/display2d/TestData.java:33–36  ·  view source on GitHub ↗

A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.

(double x, double y, double sigma)

Source from the content-addressed store, hash-verified

31 * A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.
32 */
33 public static double gaussian(double x, double y, double sigma) {
34 double rSqr = x*x+y*y;
35 return Math.exp(-rSqr/sigma/sigma/2);
36 }
37
38 /**
39 * Saddle function centered at x=0 and y=0.

Callers 1

gaussianScalarFieldMethod · 0.95

Calls 1

expMethod · 0.80

Tested by

no test coverage detected