bmel:round¶
Category: Math · Returns: bmel:number
Signature
bmel:round(expr: bmel:number, decimals: bmel:integer)
Description¶
Rounds a number to a specified number of decimal places.
Arguments¶
| Parameter | Type | Required | Description |
|---|---|---|---|
expr | bmel:number | The numeric value to round. | |
decimals | bmel:integer | Number of decimal places to round to (0 for integer rounding). |
Examples¶
Amount with two decimals
bmel:round({createOrder:Request Payload}.$.amount, 2)
Latency in seconds, one decimal
bmel:round({invokeAgent:Response Payload}.$.latency_ms / 1000, 1)