Round Up/Down

Click to copy

Rounds a float with a given precision.


Tip: if you want to round a whole number (e.g. round 1,240 to the nearest 50), you would first have to divide the whole number by the number you want to round it to (e.g. 1,240 / 50 = 24.8), then round the result (e.g. round 24.8 to 0 precision = 25), and then multiply back (e.g. 25 * 50 = 1,250).

Flow Connections

  • [Input] In - starts the block's execution.
  • [Output] Out - activates when the block has finished its execution.

Data Connections

  • [Input] Value (float) - value to be rounded.
  • [Input] Precision (integer) - number of decimals to round to (use 0 to round to a whole number).
  • [Output] Result (float) - result of the operation.