Skip to content

Commit

Permalink
changed restrictions of quad root pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
terriblegoodday committed Apr 6, 2016
1 parent 2e063e3 commit 8881d11
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
build/
build/
npm-debug.log
5 changes: 2 additions & 3 deletions js/generators.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ module.exports = {
Generate: function() {
var newX1 = 0;
var newX2 = 0;
while (newX1 == 0 || newX2 == 0) {
while ((Math.abs(newX1) == Math.abs(newX2)) || newX1 == 0 || newX2 == 0) {
newX1 = Math.round((Math.random() * 21) - 10);
newX2 = Math.round((Math.random() * 21) - 10);
};
Expand Down Expand Up @@ -315,8 +315,7 @@ module.exports = {
Generate: function() {
var newX1 = 0;
var newX2 = 0;
while (((this.x1 == 0 || this.x2 == 0)) || (newX1 == 0 || newX2 == 0)
|| (this.x1 == newX1 && this.x2 == newX2)) {
while (Math.abs(newX1) == Math.abs(newX2)) {
newX1 = Math.round((Math.random() * 21) - 10);
newX2 = Math.round((Math.random() * 21) - 10);
};
Expand Down

0 comments on commit 8881d11

Please sign in to comment.