Round value to a given number of decimal digits.
Syntax
round(value, digits=0, /)Parameters
| Name | Description |
|---|---|
valueInt | Float | Input number Required · Positional only No default |
digitsInt | Decimal digits to keep Optional · Positional only Default: 0 |
Returns
Float — Rounded numeric value.Behavior / side effects
Round value to a given number of decimal digits.
Execution
- Blocking: No
- Thread safety: Use separate objects per flow
- Parallel execution: Yes
Value operations execute in the calling flow without an intentional wait for capture, gesture completion, or user input. Create mutable containers/builders separately in each flow; this is isolation, not a shared-object synchronization guarantee.
Example
ratio = round(0.87654, 2)
text(str(ratio))Errors / limitations
No additional limitations documented; follow the parameter and behavior contract above.
Related APIs
None