Math
Calculate with numbers and vectors.
The Math nodes (Add › Math) calculate with numbers and vectors: add two values, round a float, map a frame number to a percentage, get the distance between two points. Like the Data nodes, they're value nodes: they compute their result where it's used, and again for every input it's connected to.
| Node | |
|---|---|
| Math | Add, subtract, multiply, divide, power or modulo of two numbers |
| Round Float | Rounds to a number of decimals: up, down or to the nearest |
| Clamp | Limits a value to a range |
| Map Range | Maps a value from one range to another |
| Convert Angle | Degrees to radians and back |
| Random Value | A random float, integer, boolean, vector or color |
| Vector Math | Add, subtract, multiply, divide, cross and dot product, normalize, length and distance of vectors |
| Combine Vector | A vector from X, Y, Z (and W) |
| Separate Vector | The X, Y, Z (and W) of a vector |
Fixed numbers and vectors come from the Integer, Float and Vector nodes in Values. For anything these nodes don't cover, a Python Expression does it in one line: math.sqrt(value), max(a, b), abs(value).