beta
cables is under heavy development.
There might be one or another bug, please let us know about it!
MathExpression
Ops.Math.MathExpression
Namespace: Ops.Math
calculates a user defined mathematical expression with up to 4 variables

summary (oneliner)

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.

Here are a few example equations to get you started:

(a+b)c-d
sin(a+b)-cos(c-d)
a
log(b + c * 2) / pow(b, 4)

For a reference of mathematical functions availible, please refer to the Javascript Math object: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math

doc

issues

youtube id

collections

related ops

Inputs

Parameters

A (Number)

a input, default value if not connected: 0


B (Number)

b input, default value if not connected: 0


C (Number)

c input, default value if not connected: 0


D (Number)

d input, default value if not connected: 0


Expression

Expression (String)

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


Outputs

Result (Number)

result of the equation


Expression Valid (boolean Number)

returns true if the expression is valid, false otherwise


Caught a mistake or want to contribute to the documentation?

Edit Documentationcancel save
Math expression example:


Credits


Changelog


created op
2020-07-23 - simod

Ops.User.simod.MathExpression renamed to Ops.Math.MathExpression
2020-07-23 - simod

Examples using MathExpression

Public Patches using MathExpression