Skip to main content

round

Round a number to the nearest integer

Written by Holly Conrad Smith

Use this when you want to snap a number to the nearest integer within a flow using elementary school logic, for example rounding a calculated unit count to a whole number.

Inputs

Name

Abbreviation

Type

Access

Description

Number

N

Number

Item

The number to round

Outputs

Name

Abbreviation

Type

Access

Description

Rounded

R

Number

Item

The rounded number

How to

  1. Feed in a number for the minimum, maximum, and seed

    1. This could be the a numeric result of another node

    2. Or, you can use a number node

    3. Or, you can type numbers into the boxes

    4. If you need to process multiple numbers in a list, use the map node

  2. The result is the rounded number, using elementary school logic

    1. The number will round down if less than .5

    2. The number will round up if .5 or greater

      1. ex: 3.14 → round → 3

      2. ex: 3.75 → round → 4

      3. ex. 3.5 → round → 4

Did this answer your question?