Skip to content

Commit

Permalink
add .gitignore & remove restrict in randomnumber
Browse files Browse the repository at this point in the history
  • Loading branch information
Weslie0803 committed Oct 24, 2022
1 parent d017ad7 commit 755609c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
抽奖软件UI.zip
analysis.md
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ $(document).ready(function () {
var getRandomNum = function (usedNum, minNum, maxNum, size) {
var randomNum = Math.round(Math.random() * (maxNum - minNum + 1) + minNum-0.5);

while(Math.floor(randomNum/10)-randomNum%10 == 0)
randomNum = Math.round(Math.random() * (maxNum - minNum + 1) + minNum-0.5);
// while(Math.floor(randomNum/10)-randomNum%10 == 0)
// randomNum = Math.round(Math.random() * (maxNum - minNum + 1) + minNum-0.5);
usedNum.push(randomNum);
var str = randomNum.toString();
while (str.length < size) str = '0' + str;
Expand Down

0 comments on commit 755609c

Please sign in to comment.