Added random() to Equation

This commit is contained in:
Waterpicker 2021-09-27 04:44:26 -05:00
parent c954f39700
commit f2bba1a227

View file

@ -126,6 +126,9 @@ public interface Equation {
// clamp
parseRules.add(new FunctionParser("clamp", 3, 3, (stringDoubleMap, equations) -> MathHelper.clamp(equations[0].apply(stringDoubleMap), equations[1].apply(stringDoubleMap), equations[2].apply(stringDoubleMap))));
// rand
parseRules.add(new FunctionParser("random", 0,0, ((stringDoubleMap, equations) -> Math.random())));
// variable replacer
parseRules.add(new VariableReplacer());
}