Skip to content

Arithmetic

Add

Add(nodes...: number) -> number

The sum of the nodes.

output sum = Add(1, 2, 3)
sum
6

Subtract

Subtract(a: number, b: number) -> number

a minus b.

output diff = Subtract(10, 4)
diff
6

Negate

Negate(a: number) -> number

a with its sign flipped. The `-` in front of a value is its symbol.

output below = Negate(14)
below
-14
output alsoBelow = -14
alsoBelow
-14

Multiply

Multiply(nodes...: number) -> number

The product of the nodes.

output area = Multiply(3, 4)
area
12

Divide

Divide(a: number, b: number) -> number

a divided by b; dividing by zero gives zero.

output half = Divide(9, 2)
half
4.5