invert

This block is part of the number group and was last modified in core v10.4.28.

invert v10.4.28

Turns a positive number into a negative one and a negative into a positive

In pins 1
  • number required
    number
Out pins 1
  • Number
    number

Outputs the number pin multiplied by -1, flipping its sign. Numeric strings and booleans coerce (true becomes -1); an unwired, nil, or non-numeric input outputs nil. Example: number="-4" -> 4.

additive inverse
negation

A typical wiring for invert: the number out pin feeds cast to value.

Studio canvas example for the invert block: typical wiring for invert.

Version history

Introduced in v10.4.28.


Back to number Return to the main group to view all sub-groups Back to number Return to the group to view all blocks within this group