Skip to content

Commit

Permalink
#2237 Fix long shot rating calculation (#2238)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsbrenk authored Jan 26, 2025
1 parent 862ebd2 commit 5903802
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/core/rating/RatingPredictionModel.java
Original file line number Diff line number Diff line change
Expand Up @@ -1721,7 +1721,7 @@ protected double calcLongshots(@NotNull Lineup lineup, int minute) {
}

//Tactic Level = 1.66*SC + 0.55*SP - 7.6
return 1.66 * sumScoring / n + 0.55 * sumSetPieces / n - 7.6;
return max(0, (1.66 * sumScoring + 0.55 * sumSetPieces) / n - 7.6);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
* Fix display of best position rating (#2166)
* Display coach conversion costs (#2204)
* New column "trainer notes" (#2229)
* Fix long shot rating calculation (#2237)

### Team Analyzer

Expand Down

0 comments on commit 5903802

Please sign in to comment.