Log inGet started
World

Builtin Library

Branchmain
Branchesmainpublish
Commitdd348ac6c3

README.md

value.math (procNode)

a <op> b for two numbers, the op chosen by name: add, sub, mul, div, min, max or pow. Either side can be an animated value or a live input, and the result follows it. In a graph written with operators, a * b is the same arithmetic; this node is for an operation picked by a parameter.

Inputs

  • a (Float | Int, default 0): the left operand.
  • b (Float | Int, optional): the right operand. Unwired, it is constant.
  • op (String, default "add"): the operation, as a <op> b: "add", "sub", "mul", "div", "min", "max" or "pow".
  • constant (Float, default 0): the right operand when b is unwired.

Outputs

  • value (Float): the result.

Example

local doubled = g.value.math({ a = 21, op = "mul", constant = 2 })