Skip to content

Commit

Permalink
improve logic a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosuc3m committed Oct 29, 2024
1 parent 88b700d commit 46f65b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/ai/nets/samj/ij/ui/IJ1PromptsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -489,9 +489,9 @@ else if (collectedPoints.size() > 1 && collectedPoints.size() < 50) {
collectedPoints = newCollectedPoints;
} else if (collectedPoints.size() > 50) {
List<Localizable> newCollectedPoints = new ArrayList<Localizable>();
while (newCollectedPoints.size() > 0) {
while (newCollectedPoints.size() < 10) {
for (Localizable pp : collectedPoints) {
if (Math.random() < 0.1) newCollectedPoints.add(pp);
if (Math.random() < Math.min(0.1, 50.0 / collectedPoints.size())) newCollectedPoints.add(pp);
}
}
collectedPoints = newCollectedPoints;
Expand Down

0 comments on commit 46f65b0

Please sign in to comment.