mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-10-26 14:00:14 +00:00
add ProbabilityNormalizer
This commit is contained in:
1 parent
799e1c9bf3
commit
1e0ffd10c6
1 file changed
+15
+15
@@ -0,0 +1,15 @@
|
|||||||
|
package com.dfsek.terra.addons.noise.normalizer;
|
||||||
|
|
||||||
|
import com.dfsek.terra.api.noise.NoiseSampler;
|
||||||
|
|
||||||
|
|
||||||
|
public class ProbabilityNormalizer extends Normalizer {
|
||||||
|
public ProbabilityNormalizer(NoiseSampler sampler) {
|
||||||
|
super(sampler);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public double normalize(double in) {
|
||||||
|
return (in + 1) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user