Fix rounding error in ScoreBasedScoreCalculator
Cast int to double before division to avoid truncation of the division result. Changed corresponding test so that it fails with the old implementation. Cherry-picked and backported from GH-52.
Showing
- src/main/java/de/thm/arsnova/domain/PointBasedLearningProgress.java 1 addition, 1 deletion...ava/de/thm/arsnova/domain/PointBasedLearningProgress.java
- src/test/java/de/thm/arsnova/domain/PointBasedLearningProgressTest.java 16 additions, 13 deletions...de/thm/arsnova/domain/PointBasedLearningProgressTest.java
Please register or sign in to comment