A 2D Gaussian distribution function centered at x=0 and y=0 and standard deviation of 1.
(double x, double y, double sigma)
| 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. |
no test coverage detected