Math Running

This page documents the development version of Graphite at dev.graphite.art, which may differ from the current release.

Scans along the items, giving each one the result of folding an operator like + over it and every item before it, such as a running total, or of a function like max, such as the highest value so far.

The result is read as the chosen output type: an Integer rounds to the nearest whole number, a Bool reads exactly 0 or 1 as false or true, a Vec2 takes the X and Y of a vector like 3i + 4j, and a Transform takes a matrix like rotation(pi/4) + 5i. Boolean items read as 0 or 1 and Vec2 items as such vectors. Across Transforms, * composes in order, which turns a list of steps into where each step ends up.

Interface

Inputs

ParameterDetailsPossible Types
Values

The items scanned along, each giving one result.

Primary Input

Bool[]
Integer[]
Number[]
Transform[]
Vec2[]
Operator

The operator folded along the items, like + or *, or a function given the items so far, like max or mean.

Default: +

String
Output Type

The type each result is read as.

Default: 0

Bool
Integer
Number
Transform
Vec2

Outputs

ProductDetailsPossible Types
Result

The value produced by the node operation.

Primary Output

Number[]
Integer[]
Bool[]
Vec2[]
Transform[]