Tiny JS clean

serial
William Toohey 10 years ago
parent 137fa267e8
commit 90fec6c208
  1. 6
      0x40.js

@ -1408,7 +1408,7 @@ var nColorX, nColorY, nColorZ;
function GetRandomWaifu() 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) { if(lastWaifus.indexOf(tmp) != -1) {
return GetRandomWaifu(); return GetRandomWaifu();
} }
@ -1436,8 +1436,8 @@ function rgbToHex(rgb) {
function RequestNextColor() function RequestNextColor()
{ {
var rgb = new Array; var rgb = [];
var tmp = (nCurrentColor + Math.round( (Math.random() * (colors.length - 2) ) ) + 1) % colors.length; var tmp = Math.round(Math.random() * colors.length);
if(tmp == nCurrentColor) { if(tmp == nCurrentColor) {
return RequestNextColor(); return RequestNextColor();
} }

Loading…
Cancel
Save