Math Aggregate

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

Reduces all the items to a single value by folding an operator like + or * across them, or by passing them all to a function like max or mean.

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, * and / compose in order, mean averages, and count counts.

Interface

Inputs

ParameterDetailsPossible Types
Values

The items reduced to one value.

Primary Input

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

The operator folded across the items, like + or *, or a function given all of them, like max or mean.

Default: +

String
Output Type

The type the 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