From 90fec6c2080ab32e283aa1376190f7784cd96348 Mon Sep 17 00:00:00 2001 From: William Toohey Date: Tue, 26 May 2015 23:03:36 +1000 Subject: [PATCH] Tiny JS clean --- 0x40.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/0x40.js b/0x40.js index 435bdda..41d54f2 100644 --- a/0x40.js +++ b/0x40.js @@ -1408,7 +1408,7 @@ var nColorX, nColorY, nColorZ; function GetRandomWaifu() { - var tmp = Math.round((Math.random() * (waifus.length - 1))); + var tmp = Math.round(Math.random() * (waifus.length - 1)); if(lastWaifus.indexOf(tmp) != -1) { return GetRandomWaifu(); } @@ -1436,8 +1436,8 @@ function rgbToHex(rgb) { function RequestNextColor() { - var rgb = new Array; - var tmp = (nCurrentColor + Math.round( (Math.random() * (colors.length - 2) ) ) + 1) % colors.length; + var rgb = []; + var tmp = Math.round(Math.random() * colors.length); if(tmp == nCurrentColor) { return RequestNextColor(); }