Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
eyes:flowcontrol:calculate [2018/01/17 12:27]
sfiedle [Example]
eyes:flowcontrol:calculate [2018/01/23 16:17]
sfiedle [Example]
Line 4: Line 4:
  
 ===== Usage ===== ===== Usage =====
 +{{ :​eyes:​flowcontrol:​calcprop.png?​nolink|}}
 This Flow Control element can apply standard arithmetic (+,-,*,/) onto a Variable. Furthermore,​ the modulo (%) and exponentiation (^) methods are implemented in Lua 5.1. This Flow Control element can apply standard arithmetic (+,-,*,/) onto a Variable. Furthermore,​ the modulo (%) and exponentiation (^) methods are implemented in Lua 5.1.
-Recall ​that a calculation of a Variable ​of type decimal and a Variable of type integer returns a decimal Variable.+To edit the formula fill in the Formula field in the Properties. Please note that Variables are called with cow.VariableName.\\ 
 +**  Computation with constant ** \\ 
 +cow.VariableName = cow.VariableName + ( any standard arithmetic symbol )  constant \\ 
 +**  Computation with other Cow Variable ​** \\ 
 +cow.VariableName = cow.VariableName + ( any standard arithmetic symbol )  cow.VariableName \\
  
-To edit the formula fill in the Formula field in the Properties. Please note that Variables are called with cow.VariableName.+Recall ​that a calculation of a Variable of type decimal and a Variable of type integer returns a Variable of type decimal\\ 
 +\\ 
 +\\
  
-** cow.VariableName = cow.VariableName + (any standard arithmetic symbol )  constant/​cow.VariableName ** 
- 
-{{ :​eyes:​flowcontrol:​calcprop.png?​nolink |}} 
 ===== Example ==== ===== Example ====
-{{ :​eyes:​flowcontrol:​examplecalc.png?​nolink&​800 |}} + 
-|< 100% 550% >|+{{:​eyes:​flowcontrol:​examplecalc.png?​nolink&​700  ​|}} 
 + 
 +**Properties Window** 
 +|< 100% 240% >|
 ^                    ^                        ^ ^                    ^                        ^
-|{{:​eyes:​flowcontrol:​a.png?​nolink&​60 |}}|{{:​eyes:​flowcontrol:​boxinteger.png?​nolink |}}| | +|{{:​eyes:​flowcontrol:​a.png?​nolink&​20|}}|{{:​eyes:​flowcontrol:​boxinteger.png?​nolink&600|}}|The [[eyes:​flowcontrol:​variable|]] factor is passed to the logic [[eyes:​logics:​boxmanipulation|]]. Factor is used as the coarse factor ​ for the selected processor Coarse.
-|{{:​eyes:​flowcontrol:​b.png?​nolink&​60 |}}|{{:​eyes:​flowcontrol:​varinteger.png?​nolink |}} |The [[eyes:​flowcontrol:​variable|]] is set up as an integer ​call factor ​with default value 2 +|{{:​eyes:​flowcontrol:​b.png?​nolink&​20|}}|{{:​eyes:​flowcontrol:​varinteger.png?​nolink&600|}}|Here the [[eyes:​flowcontrol:​variable|]] ​called factor ​is of type integer with default value two. To see how to set up and use a [[eyes:​flowcontrol:​variable|]] follow the link.| 
-|{{:​eyes:​flowcontrol:​c.png?​nolink&​60 |}}|{{:​eyes:​flowcontrol:​groupcalc.png?​nolink |}}|The Calculate ​element displays the computation. Here are some examples given. | +|{{:​eyes:​flowcontrol:​c.png?​nolink&​20|}}|{{:​eyes:​flowcontrol:​groupcalc.png?​nolink&600|}}|After clicking into the grey part of the element ​[[eyes:​flowcontrol:​group|]] the properties window ​displays the current value of the [[eyes:​flowcontrol:​variable|]] factor.| 
-|{{:​eyes:​flowcontrol:​d.png?​nolink&​60 |}}|{{:​eyes:​flowcontrol:​examplecalcprop.png?​nolink&​700 |}} | |+|{{:​eyes:​flowcontrol:​d.png?​nolink&​20|}}|{{:​eyes:​flowcontrol:​examplecalcprop.png?​nolink&​600|}}|The Calculate element displays the computation. Here the sum of the [[eyes:​flowcontrol:​variable|]] factor and one is written back to the  [[eyes:​flowcontrol:​variable|]] factor.|
  
 ===== Parameters and I/O ===== ===== Parameters and I/O =====