mod

open fun mod(@NonNull first: Expression, @NonNull second: Expression): Expression

Returns the remainder after integer division of the first input by the second.

Example usage:


CircleLayer circleLayer = new CircleLayer("layer-id", "source-id");
circleLayer.setProperties(
    circleRadius(mod(literal(10.0f), pi()))
);

Return

expression

Parameters

first

the first number

second

the second number

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#%25">Style specification</a>

open fun mod(@NonNull first: Number, @NonNull second: Number): Expression

Returns the remainder after integer division of the first input by the second.

Example usage:


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

Return

expression

Parameters

first

the first number

second

the second number

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#%25">Style specification</a>