Logmanager documentation
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

Atrithmetic

This block is used to perform arithmetic operations on numbers (int and float).

Both inputs are required and both must be numbers. In case any of inputs is not a number behavior of this block is undefined.

Allowed operations are:

  • addition +
  • subtraction -
  • multiplication *
  • division /

Block XML representation

XML representation of math_arithmetic block

<xml xmlns="http://www.w3.org/1999/xhtml">
  <block type="math_arithmetic">
    <field name="OP">ADD</field>
    <value name="A">
      <block type="math_number">
        <field name="NUM">1</field>
      </block>
    </value>
    <value name="B">
      <block type="math_float">
        <field name="NUM">1.1</field>
      </block>
    </value>
  </block>
</xml>

Example of visual representation

Block math arithmetic

Block math arithmetic