Expressions / renamed operator pow to ^

To be more in line with Mapbox style spec
This commit is contained in:
Olivier Guyot
2019-10-25 14:09:32 +02:00
parent a844691d7b
commit ff3cc9b4d0
3 changed files with 6 additions and 6 deletions

View File

@@ -24,7 +24,7 @@ import {asArray, isStringColor} from '../color.js';
* * `['-', value1, value1]` subtracts `value2` from `value1`
* * `['clamp', value, low, high]` clamps `value` between `low` and `high`
* * `['mod', value1, value1]` returns the result of `value1 % value2` (modulo)
* * `['pow', value1, value1]` returns the value of `value1` raised to the `value2` power
* * `['^', value1, value1]` returns the value of `value1` raised to the `value2` power
*
* * Transform operators:
* * `['match', input, match1, output1, ...matchN, outputN, fallback]` compares the `input` value against all
@@ -401,7 +401,7 @@ Operators['mod'] = {
return `mod(${expressionToGlsl(context, args[0])}, ${expressionToGlsl(context, args[1])})`;
}
};
Operators['pow'] = {
Operators['^'] = {
getReturnType: function(args) {
return ValueTypes.NUMBER;
},