Expressions / renamed mod to % to be more in line with MB style spec

This commit is contained in:
Olivier Guyot
2019-10-28 15:53:55 +01:00
parent 501c90b0a2
commit b96e70e952
3 changed files with 7 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ import {asArray, isStringColor} from '../color.js';
* * `['+', value1, value1]` adds `value1` and `value2`
* * `['-', 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)
* * `['%', value1, value1]` returns the result of `value1 % value2` (modulo)
* * `['^', value1, value1]` returns the value of `value1` raised to the `value2` power
*
* * Transform operators:
@@ -412,7 +412,7 @@ Operators['clamp'] = {
return `clamp(${expressionToGlsl(context, args[0])}, ${min}, ${max})`;
}
};
Operators['mod'] = {
Operators['%'] = {
getReturnType: function(args) {
return ValueTypes.NUMBER;
},