?? gaussianfilter.java
字號:
package org.sunflow.core.filter;
import org.sunflow.core.Filter;
public class GaussianFilter implements Filter {
private float s;
private float es2;
public GaussianFilter(float size) {
s = size;
es2 = (float) -Math.exp(-s * s);
}
public float getSize() {
return s;
}
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;
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -