round

open fun round(expression: Expression): Expression(source)

Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example `[\"round\", -1.5]` evaluates to -2.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(round(pi()))
);

Return

expression

Parameters

expression

number expression to round

See also


open fun round(@NonNull number: Number): Expression(source)

Rounds the input to the nearest integer. Halfway values are rounded away from zero. For example `[\"round\", -1.5]` evaluates to -2.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(round(3.14159265359f))
);

Return

expression

Parameters

number

number to round

See also