log2

open fun log2(@NonNull number: Expression): Expression

Returns the base-two logarithm of the input.

Example usage:


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

Return

expression

Parameters

number

the number to take base-two logarithm from

See also

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

open fun log2(@NonNull number: Number): Expression

Returns the base-two logarithm of the input.

Example usage:


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

Return

expression

Parameters

number

the number to take base-two logarithm from

See also

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