Skip to content

Commit

Permalink
Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
AspieSoft committed Nov 11, 2020
1 parent 12a1687 commit 3c79d49
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aspiesoft/random-number-js",
"version": "1.3.1",
"version": "1.3.2",
"description": "Generate random numbers with more variety.",
"license": "MIT",
"author": "AspieSoft",
Expand Down
5 changes: 4 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! https://github.com/AspieSoft/random-number-js v1.3.1 | (c) [email protected] */
/*! https://github.com/AspieSoft/random-number-js v1.3.2 | (c) [email protected] */

;const random = (function(){
const options = {
Expand Down Expand Up @@ -141,6 +141,9 @@
if(options.avoidRadius !== 0){
for(let i = 0; i < preRand.length; i++){
if(preRand[i] >= result-options.avoidRadius && preRand[i] <= result+options.avoidRadius){
if(Math.floor(Math.random()*100) % 3 === 0 && Math.floor(Math.random()*100) % 3 === 0){
oldRand.splice(i, 1);
}
if(Math.floor(Math.random()*100) % 2 === 0){
oldRand.splice(i, 1);
return randomInt(min, max, liteMode);
Expand Down
4 changes: 2 additions & 2 deletions script.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 3c79d49

Please sign in to comment.