Round
Input
| value |
|---|
Round value to 2 decimal places (halfUp)
transformation:round
Round a number to N decimal places
source:value
parameters
- decimalPlaces
- roundingMode
Number of decimal places (0–20)
How to handle ties at the midpoint
Output
| value |
|---|
| 3.14 |
| 2.01 |
| -1.68 |
| 0 |
| 1000 |
| -0.01 |
Sample inputs run locally in your browser using the same operation logic as Fontana Flow.
Results are illustrative, not connected to a workflow.
Round a number to N decimal places.
Parameters
- decimalPlaces (Decimal Places, number, optional) — Number of decimal places (0–20). Default:
2. - roundingMode (Rounding Mode, string, optional) — How to handle ties at the midpoint. Allowed values:
halfUp,halfDown,halfEven.
Field selection
- source — Field whose values this operation reads. Omit to apply to all fields on the row.
- target — Optional output field. When omitted, the source field is updated in place.
JSON Configuration
{ "id": "op-round", "type": "transformation", "action": "round", "params": { "decimalPlaces": 2, "roundingMode": "halfUp" }, "testInputs": [ "3.14159", "2.005", "-1.678", "0.0049", "999.995", "-0.005" ]}