Sha256: edd078a938447a1f558ece94fbb4c993e77bc8c4d7d304a35298e59c718f5229
Contents?: true
Size: 522 Bytes
Versions: 6
Compression:
Stored size: 522 Bytes
Contents
package org.sunflow.core.filter; import org.sunflow.core.Filter; public class GaussianFilter implements Filter { private float es2; public GaussianFilter() { es2 = (float) -Math.exp(-getSize() * getSize()); } @Override public final float getSize() { return 3.0f; } @Override public float get(float x, float y) { float gx = (float) Math.exp(-x * x) + es2; float gy = (float) Math.exp(-y * y) + es2; return gx * gy; } }
Version data entries
6 entries across 6 versions & 1 rubygems