MathExpression Op

MathExpression

calculates a user defined mathematical expression


<p>With this op, you can write your own mathematical expression to be calculated. You can use up to 4 numbers (a, b, c, d) in this equation. Just type in the lower-case letter of the port you want to use in the equation input.</p> <p>Here are a few example equations to get you started:</p> <p>(a+b)<em>c-d sin(a+b)-cos(c-d) a</em>log(b + c * 2) / pow(b, 4)</p> <p>For a reference of mathematical functions availible, please refer to the Javascript Math object: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math">https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math</a></p>


Full Name
  • Ops.Math.MathExpression
Visibility
  • Core Op - Official cables op
License
  • MIT
Authorgithub


INPUT PORTS


Parameters

A (Number)

<p>a input, default value if not connected: 0</p>

B (Number)

<p>b input, default value if not connected: 0</p>

C (Number)

<p>c input, default value if not connected: 0</p>

D (Number)

<p>d input, default value if not connected: 0</p>

Expression

Expression (String)

<p>mathematical expression to be calculated: the variables a, b, c, d can be used here</p>

OUTPUT PORTS


Result (Number)

<p>result of the equation</p>

Expression Valid (

<i>boolean</i>

Number)

<p>returns true if the expression is valid, false otherwise</p>


Patches using MathExpression

  • Examples
  • Public
  • My Patches

Changelog


created opuser avatarsimod - 2020-07-23 11:23
Ops.User.simod.MathExpression renamed to Ops.Math.MathExpressionuser avatarsimod - 2020-07-23 11:24