cos

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

Returns the cosine of the input.

Example usage:


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

Return

expression

Parameters

number

the number to calculate the cosine for

See also

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

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

Returns the cosine of the input.

Example usage:


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

Return

expression

Parameters

number

the number to calculate the cosine for

See also

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