mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 05:40:16 +00:00
move Sampler to util package
This commit is contained in:
@@ -4,7 +4,7 @@ import net.jafama.FastMath;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.dfsek.terra.api.world.generator.Sampler;
|
||||
import com.dfsek.terra.api.util.math.Sampler;
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.dfsek.terra.api.world.generator;
|
||||
|
||||
import com.dfsek.terra.api.util.math.Sampler;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.dfsek.terra.api.world.generator;
|
||||
|
||||
@FunctionalInterface
|
||||
public interface Sampler {
|
||||
double sample(double x, double y, double z);
|
||||
|
||||
default double sample(int x, int y,
|
||||
int z) { // Floating-point modulus operations are expensive. This allows implementations to optionally handle
|
||||
// integers separately.
|
||||
return sample((double) x, y, z);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.dfsek.terra.api.world.generator;
|
||||
|
||||
import com.dfsek.terra.api.util.math.Sampler;
|
||||
|
||||
public interface SamplerCache {
|
||||
Sampler get(int x, int z);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user