Stateless simplex
This commit is contained in:
@@ -28,9 +28,6 @@ import static mindustry.Vars.*;
|
||||
public class LExecutor{
|
||||
public static final int maxInstructions = 1000;
|
||||
|
||||
//for noise operations
|
||||
public static final Simplex noise = new Simplex();
|
||||
|
||||
//special variables
|
||||
public static final int
|
||||
varCounter = 0,
|
||||
|
||||
@@ -2,6 +2,7 @@ package mindustry.logic;
|
||||
|
||||
import arc.math.*;
|
||||
import arc.util.*;
|
||||
import arc.util.noise.*;
|
||||
|
||||
public enum LogicOp{
|
||||
add("+", (a, b) -> a + b),
|
||||
@@ -32,7 +33,7 @@ public enum LogicOp{
|
||||
min("min", true, Math::min),
|
||||
angle("angle", true, (x, y) -> Angles.angle((float)x, (float)y)),
|
||||
len("len", true, (x, y) -> Mathf.dst((float)x, (float)y)),
|
||||
noise("noise", true, LExecutor.noise::rawNoise2D),
|
||||
noise("noise", true, (x, y) -> Simplex.raw2d(0, x, y)),
|
||||
abs("abs", a -> Math.abs(a)),
|
||||
log("log", Math::log),
|
||||
log10("log10", Math::log10),
|
||||
|
||||
Reference in New Issue
Block a user