merge upstream, fix compile errors

This commit is contained in:
realbigsean
2023-01-11 13:52:58 -05:00
100 changed files with 1304 additions and 505 deletions

View File

@@ -186,14 +186,7 @@ impl RealScore {
/// Add an f64 to the score abiding by the limits.
fn add(&mut self, score: f64) {
let mut new_score = self.lighthouse_score + score;
if new_score > MAX_SCORE {
new_score = MAX_SCORE;
}
if new_score < MIN_SCORE {
new_score = MIN_SCORE;
}
let new_score = (self.lighthouse_score + score).clamp(MIN_SCORE, MAX_SCORE);
self.set_lighthouse_score(new_score);
}