round
relationalai.semantics.std.math
round(value: NumberValue, scale: NumberValue | None = None) -> ExpressionRound to a specified number of decimal places.
Parameters
Section titled “Parameters”
(valueNumberValue) - The input value.
(scaleNumberValue|None, default:None) - Number of decimal places to round to. IfNone, rounds to the nearest integer. Default:None.
Returns
Section titled “Returns”Expression- AnExpressioncomputing the rounded value. ReturnsNumberif the input isNumber, orFloatif the input isFloat.
Examples
Section titled “Examples”Round to nearest integer:
select(math.round(Product.price))select(math.round(3.7))Round to two decimal places:
select(math.round(Product.price, 2))select(math.round(3.14159, 4))