From c037adf396c92212d309d268e88eecf1047d2c74 Mon Sep 17 00:00:00 2001 From: Colin Megill Date: Wed, 18 Apr 2018 00:32:24 -0700 Subject: [PATCH] move color rgb to own file, remove generators --- src/components/graph/util.js | 37 ------------------------------------ 1 file changed, 37 deletions(-) diff --git a/src/components/graph/util.js b/src/components/graph/util.js index c7ca2153..ef2e39d9 100644 --- a/src/components/graph/util.js +++ b/src/components/graph/util.js @@ -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; -}