mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-02-16 02:20:57 +00:00
Reformat
This commit is contained in:
@@ -6,7 +6,7 @@ package com.dfsek.terra.api.noise;
|
||||
public interface DerivativeNoiseSampler extends NoiseSampler {
|
||||
|
||||
static boolean isDifferentiable(NoiseSampler sampler) {
|
||||
if (sampler instanceof DerivativeNoiseSampler dSampler) {
|
||||
if(sampler instanceof DerivativeNoiseSampler dSampler) {
|
||||
return dSampler.isDifferentiable();
|
||||
}
|
||||
return false;
|
||||
@@ -22,19 +22,23 @@ public interface DerivativeNoiseSampler extends NoiseSampler {
|
||||
|
||||
/**
|
||||
* Derivative return version of standard 2D noise evaluation
|
||||
*
|
||||
* @param seed
|
||||
* @param x
|
||||
* @param y
|
||||
*
|
||||
* @return 3 element array, in index order: noise value, partial x derivative, partial y derivative
|
||||
*/
|
||||
double[] noised(long seed, double x, double y);
|
||||
|
||||
/**
|
||||
* Derivative return version of standard 3D noise evaluation
|
||||
*
|
||||
* @param seed
|
||||
* @param x
|
||||
* @param y
|
||||
* @param z
|
||||
*
|
||||
* @return 4 element array, in index order: noise value, partial x derivative, partial y derivative, partial z derivative
|
||||
*/
|
||||
double[] noised(long seed, double x, double y, double z);
|
||||
|
||||
@@ -29,7 +29,7 @@ public final class MathUtil {
|
||||
|
||||
static {
|
||||
sinTable = new long[lookupTableSizeWithMargin];
|
||||
for (int i = 0; i < lookupTableSizeWithMargin; i++) {
|
||||
for(int i = 0; i < lookupTableSizeWithMargin; i++) {
|
||||
double d = i * tauOverLookupSize;
|
||||
sinTable[i] = Double.doubleToRawLongBits(StrictMath.sin(d));
|
||||
}
|
||||
|
||||
@@ -7,18 +7,18 @@
|
||||
|
||||
package com.dfsek.terra.api.world.biome.generation;
|
||||
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
import com.dfsek.terra.api.util.Column;
|
||||
import com.dfsek.terra.api.util.vector.Vector3;
|
||||
import com.dfsek.terra.api.util.vector.Vector3Int;
|
||||
import com.dfsek.terra.api.world.biome.Biome;
|
||||
import com.dfsek.terra.api.world.info.WorldProperties;
|
||||
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
|
||||
/**
|
||||
* Provides locations of biomes in a world.
|
||||
|
||||
Reference in New Issue
Block a user