Arithmetic Operators

Arithmetic operators

  • + (addition)
  • - (subtraction)
  • * (multiplication)
  • / (division)
Also, you can use ( and ) to make groups in maths formula. Example: (2+3)*3 results in 15, but 2+3*3 results in 18

Maths functions

  • floor(variable)
  • ceil(variable)
  • round(variable, precision)
  • min(var1, var2, ...)
  • minpositiveorzero(var1, var2, ...)
  • max(var1, var2, ...)
  • average(var1, var2, ...)
  • sum(var1, var2, ...)
  • rangesum(var1, var2, step)
  • power(var1, var2)
  • pi()
  • mod(var1, var2)
Some examples of using these math functions:
1) example of using min() function
min({uni_cpo_width}, {uni_cpo_height})
The result of the function above will be whatever variable has bigger value. For instance, if width equal to 10 and height is equal to 5, than the result will be 10.
1) example of using rangesum() function
rangesum({uni_cpo_start}, {uni_cpo_end}, 1)
The result of the function above will be the sum of numbers with a given step. For instance, if start equal to 5 and end is equal to 7 and step is 1, than the result will be 5+6+7=18. Another example, if start equal to 0 and end is equal to 30 and step is 10, than the result will be 0+10+20+30=60.
Copy link
Outline
Arithmetic operators
Maths functions