Skip to content

op

Operations

Arithmetic and logic: computes two values with the chosen operation and puts the result into a variable.

Syntax

op add result a b

Parameters

ParameterTypeDefaultValues
opLogicOpadd
  • add +
  • sub -
  • mul *
  • div /
  • idiv //
  • mod %
  • emod %%
  • pow ^
  • equal ==
  • notEqual not
  • land and
  • lessThan <
  • lessThanEq <=
  • greaterThan >
  • greaterThanEq >=
  • strictEqual ===
  • shl <<
  • shr >>
  • ushr >>>
  • or or
  • and b-and
  • xor xor
  • not flip
  • max max()
  • min min()
  • angle angle()
  • angleDiff anglediff()
  • len len()
  • noise noise()
  • abs abs
  • sign sign
  • log log
  • logn logn
  • log10 log10
  • floor floor
  • ceil ceil
  • round round
  • sqrt sqrt
  • rand rand
  • sin sin
  • cos cos
  • tan tan
  • asin asin
  • acos acos
  • atan atan
destvalueresult
avaluea
bvalueb

Data taken from Mindustry v160.4 by the project generators.

Unofficial fan project, not affiliated with Anuke. Mindustry sprites, fonts and translations © Anuke, used under GPL-3.0; Fira Code under OFL-1.1. Site code is GPL-3.0.