mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-17 13:49:57 +00:00
move Sampler to util package
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
dependencies {
|
||||
"shadedApi"("net.jafama:jafama:2.3.2")
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.dfsek.terra.api.util.math;
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user