mirror of
https://github.com/plan-player-analytics/Plan.git
synced 2024-12-29 12:37:40 +01:00
Fixed ArithmetricException in AnalysisUtils #438
This commit is contained in:
parent
34069d2477
commit
b1e82f7ebc
@ -186,15 +186,17 @@ public class AnalysisUtils {
|
||||
|
||||
double probability = 1.0;
|
||||
|
||||
if (!similarM.isEmpty()) {
|
||||
int stickM = 0;
|
||||
for (StickyData stickyData : stickyStuckM) {
|
||||
if (similarM.contains(stickyData)) {
|
||||
stickM++;
|
||||
}
|
||||
}
|
||||
|
||||
probability *= (stickM / similarM.size());
|
||||
}
|
||||
|
||||
if (!similarW.isEmpty()) {
|
||||
int stickW = 0;
|
||||
for (StickyData stickyData : stickyStuckW) {
|
||||
if (similarW.contains(stickyData)) {
|
||||
@ -203,6 +205,7 @@ public class AnalysisUtils {
|
||||
}
|
||||
|
||||
probability *= (stickW / similarW.size());
|
||||
}
|
||||
return probability;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user