UNPKG

@darkobits/lolcatjs

Version:

Fork of https://github.com/robertmarsal/lolcatjs.

18 lines (17 loc) 551 B
function makeItRainbow(freq, i) { return { red: Math.round(Math.sin(freq * i) * 127 + 128), green: Math.round(Math.sin(freq * i + 2 * Math.PI / 3) * 127 + 128), // tslint:disable-line binary-expression-operand-order blue: Math.round(Math.sin(freq * i + 4 * Math.PI / 3) * 127 + 128) // tslint:disable-line binary-expression-operand-order }; } function randyNumPlz(lowest, biggest) { return Math.random() * (biggest - lowest + 1) + lowest; } export { makeItRainbow, randyNumPlz }; //# sourceMappingURL=random-tingz.js.map