Use Math.log2

This commit is contained in:
Tim Schaub
2022-07-27 15:11:14 -06:00
parent f32517a77f
commit fab4e83745
4 changed files with 3 additions and 56 deletions
+1 -2
View File
@@ -6,7 +6,6 @@
import PaletteTexture from '../webgl/PaletteTexture.js';
import {Uniforms} from '../renderer/webgl/TileLayer.js';
import {asArray, fromString, isStringColor} from '../color.js';
import {log2} from '../math.js';
/**
* Base type used for literal style parameters; can be a number literal or the output of an operator,
@@ -183,7 +182,7 @@ export function getValueType(value) {
* @return {boolean} True if only one type flag is enabled, false if zero or multiple
*/
export function isTypeUnique(valueType) {
return log2(valueType) % 1 === 0;
return Math.log2(valueType) % 1 === 0;
}
/**