move color rgb to own file, remove generators

This commit is contained in:
Colin Megill
2018-04-18 00:32:24 -07:00
parent 6a0241314d
commit c037adf396
-37
View File
@@ -23,40 +23,3 @@
//
// return expressionsCountsMap;
// }
export const generatePoints = function (count) {
return Array(count).fill().map(function () {
return [
Math.random() - 0.5,
Math.random() - 0.5
]
})
}
export const generateSizes = function (count) {
return Array(count).fill().map(function () {
return Math.random() * 10
})
}
export const generateColors = function (count) {
return Array(count).fill().map(function () {
return [
Math.random(),
Math.random(),
Math.random()
]
})
}
export const scaleRGB = (input) => {
const outputMax = 1;
const outputMin = 0;
const inputMax = 255;
const inputMin = 0;
const percent = (input - inputMin) / (inputMax - inputMin);
return percent * (outputMax - outputMin) + outputMin;
}