Commit 4399d564 authored by EmreTr1's avatar EmreTr1
Browse files

minor fixes

parent bb3b18ea
...@@ -21,7 +21,7 @@ public class MoLangMath { ...@@ -21,7 +21,7 @@ public class MoLangMath {
put("die_roll", params -> dieRoll(params.getDouble(0), params.getDouble(1), params.getDouble(2))); put("die_roll", params -> dieRoll(params.getDouble(0), params.getDouble(1), params.getDouble(2)));
put("die_roll_integer", params -> dieRollInt(params.getInt(0), params.getInt(1), params.getInt(2))); put("die_roll_integer", params -> dieRollInt(params.getInt(0), params.getInt(1), params.getInt(2)));
put("exp", params -> Math.exp(params.getDouble(0))); put("exp", params -> Math.exp(params.getDouble(0)));
put("mod", params -> params.getDouble(0) % params.getDouble(0)); put("mod", params -> params.getDouble(0) % params.getDouble(1));
put("floor", params -> Math.floor(params.getDouble(0))); put("floor", params -> Math.floor(params.getDouble(0)));
put("hermite_blend", params -> hermiteBlend(params.getInt(0))); put("hermite_blend", params -> hermiteBlend(params.getInt(0)));
put("lerp", params -> lerp(params.getDouble(0), params.getDouble(1), params.getDouble(2))); put("lerp", params -> lerp(params.getDouble(0), params.getDouble(1), params.getDouble(2)));
......
...@@ -30,7 +30,7 @@ public class MoParams { ...@@ -30,7 +30,7 @@ public class MoParams {
} }
public boolean contains(int index) { public boolean contains(int index) {
return params.get(index) != null; return params.size() >= index + 1;
} }
public int getInt(int index) { public int getInt(int index) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment