Skip to content

Commit 7b70b30

Browse files
authored
Update Population.java
It should continue in loop as long as one of the number under 1. It throws exception after this point when "getValueOne" is greater than 1 and "getValueTwo" is negative
1 parent 2ced48b commit 7b70b30

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/cdr/gen/Population.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ protected RandomGaussian getRandomGaussian(long stdDev, long mean) {
126126

127127
do {
128128
gaussNum = RandomGaussian.generate(stdDev, mean);
129-
} while (gaussNum.getValueOne() < 1 && gaussNum.getValueTwo() < 1);
129+
} while (gaussNum.getValueOne() < 1 || gaussNum.getValueTwo() < 1);
130130

131131
return gaussNum;
132132
}

0 commit comments

Comments
 (0)