mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-28 07:22:21 -08:00
Merge pull request #2579 from DeltaNedas/logicops
add lua-style integer division with //
This commit is contained in:
commit
c5fffb9ddd
1 changed files with 1 additions and 0 deletions
|
|
@ -7,6 +7,7 @@ public enum LogicOp{
|
|||
sub("-", (a, b) -> a - b),
|
||||
mul("*", (a, b) -> a * b),
|
||||
div("/", (a, b) -> a / b),
|
||||
idiv("//", (a, b) -> Math.floor(a / b)),
|
||||
mod("%", (a, b) -> a % b),
|
||||
equal("==", (a, b) -> Math.abs(a - b) < 0.000001 ? 1 : 0, (a, b) -> a == b ? 1 : 0),
|
||||
notEqual("not", (a, b) -> Math.abs(a - b) < 0.000001 ? 0 : 1, (a, b) -> a != b ? 1 : 0),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue