Skip to main content

Number Node

Number Node Screenshot

Overview

The Number Node is used to output a constant number value or convert an input value into a number. It can also be configured to round the number to a certain number of decimal places.

Inputs

TitleData TypeDescriptionDefault ValueNotes
InputanyThe value to be converted into a number.(empty)This input is only available if Use Value Input is enabled. The input will be coerced to a number.

Example 1: Output a constant number

  1. Create a Number Node.
  2. Set the Value to 123.456.
  3. Run the graph. The Value output of the Number Node should be 123.456.

Number Node Example 1

Example 2: Convert a string to a number

  1. Create a Text Node and set the text to 123.456.
  2. Create a Number Node and enable the Use Value Input setting.
  3. Connect the Text Node to the Input of the Number Node.
  4. Run the graph. The Value output of the Number Node should be 123.456.

Number Node Example 2

Example 3: Round a number

  1. Create a Number Node.
  2. Set the Value to 123.456.
  3. Enable the Round setting and set Round To to 2.
  4. Run the graph. The Value output of the Number Node should be 123.46.

Number Node Example 3

Error Handling

The Number Node will not error under normal circumstances. If the Input value cannot be converted to a number, it will default to the Value setting.

FAQ

Q: Can I use the Number Node to convert a boolean to a number?

A: Yes, you can use the Number Node to convert a boolean to a number. A true value will be converted to 1 and a false value will be converted to 0.

Q: What happens if I connect a non-numeric value to the Input of the Number Node?

A: The Number Node will attempt to convert the input value to a number. If the conversion is not possible, the node will default to the Value setting.

Q: Can I use the Number Node to round a number to an integer?

A: Yes, you can use the Number Node to round a number to an integer by enabling the Round setting and setting Round To to 0.

See Also