-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Add abs, round, floor, ceil operators #11653
Conversation
@@ -362,6 +363,11 @@ std::unordered_map<std::string, CompoundExpressionRegistry::Definition> initiali | |||
return result; | |||
}); | |||
|
|||
define("round", [](double x) -> Result<double> { return { std::round(x) }; }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The extra brackets in the return expression should be unnecessary.
Are we going to include SDK bindings for these in boba? |
mapbox-gl-native/platform/darwin/src/NSExpression+MGLAdditions.mm Lines 829 to 840 in 33d3c27
|
be193fa
to
8aa1c1e
Compare
I will run point on getting android integrated. We are planning one more beta release this week before doing a final next. @anandthakker thanks for adding these useful math expressions! |
Android integration in #11655 was approved and has been merged into this PR. |
@@ -2046,7 +2046,7 @@ | |||
} | |||
|
|||
/** | |||
* Value to use for a text label. Within literal values and zoom functions, property names enclosed in curly brackets (e.g. `{token}`) are replaced with the value of the named property. Expressions and property functions do not support this syntax; for equivalent functionality in expressions, use the [`concat`](#expressions-concat) and [`get`](#expressions-get) operators. | |||
* Value to use for a text label. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reflects these changes: mapbox/mapbox-gl-js#6216
Port of mapbox/mapbox-gl-js#6496