ITUR

Math

Combines two numbers with one operation: add, multiply, compare, round, clamp, sine and more.

What it is for

The glue between a signal and a setting: scale an audio value, add a base level, invert a hand gesture, turn a level into an on/off switch. Most control chains use one or two of them.

How it works

The node applies the chosen Operation to A and B and outputs the result; the operations that need only one number use A and ignore B. The node's title shows the operation. In a chain that feeds a force, the node is computed for each particle, so a per-particle source upstream (Particle Info, Noise) gives a per-particle result. In the inputs read once for the whole system (Time Scale, Appearance, effects) it gives one number, and per-particle sources count as 0 there.

Connections

Plug signals (Hand, Audio, Wave, Time, another Math...) into A and B, or type a constant. The Value output goes into any number input: a force's Strength, the Particle System's Time Scale, an effect's Strength, another Math node.

Settings

SettingWhat it doesDefault
AFirst number. For the one-number operations (Sine, Cosine, Absolute, Fraction, Floor, Ceil, Round, Sign) it is the only one used.1
BSecond number: what is added, the multiplier, the divisor, the exponent, the value compared with, or the upper edge for Smooth Step and Clamp.1
OperationAdd: A + B. Subtract: A - B. Multiply: A x B. Divide: A / B (a B of 0 does not fail but gives a huge number). Power: A raised to the power B, on the absolute value of A. Minimum / Maximum: the smaller / the larger of the two. Sine / Cosine: of A, in radians. Absolute: A without its sign. Smooth Step: 0 when A is at 0 or below, 1 when A reaches B, a soft S-curve in between. Less Than / Greater Than: 1 when A is smaller / larger than B, otherwise 0. Modulo: what is left of A after removing whole multiples of B (loops A between 0 and B). Fraction: the decimal part of A. Floor / Ceil / Round: A rounded down / up / to the nearest whole number. Clamp: A kept between 0 and B. Sign: -1, 0 or 1.
  • Add
  • Subtract
  • Multiply
  • Divide
  • Power
  • Minimum
  • Maximum
  • Sine
  • Cosine
  • Absolute
  • Smooth Step (A=x, B=edge)
  • Less Than
  • Greater Than
  • Modulo
  • Fraction
  • Floor
  • Ceil
  • Round
  • Clamp (0..B)
  • Sign

Outputs

Value

Tips

See also

Map RangeVector MathValueMonitor