After ESLint in utils

This commit is contained in:
Christian Paul 2017-12-23 00:07:34 -08:00
parent 088b9a3b71
commit 804b55076d

View File

@ -14,7 +14,7 @@ const constants = {
const utils = { const utils = {
clamp: (num, min, max) => { clamp: (num, min, max) => {
if (num <= min) { if (num <= min) {
return min return min;
} else if (num >= max) { } else if (num >= max) {
return max; return max;
} else { } else {
@ -69,7 +69,7 @@ const utils = {
if (color.length === 3) { if (color.length === 3) {
const rgb = [decimal>>8, (decimal>>4)&15, decimal&15]; const rgb = [decimal>>8, (decimal>>4)&15, decimal&15];
return rgb.map((c) => { return rgb.map((c) => {
return c + (c<<4); return c + (c<<4);
}); });
} else { } else {
return [(decimal>>16)&255, (decimal>>8)&255, decimal&255]; return [(decimal>>16)&255, (decimal>>8)&255, decimal&255];
@ -91,7 +91,7 @@ const utils = {
}, },
population: (val) => { population: (val) => {
let bits = 0 let bits = 0;
while (val > 0) { while (val > 0) {
bits += val & 1; bits += val & 1;
val >>= 1; val >>= 1;