replace powi with powf (/b/2785319+DT on linux)
This commit is contained in:
@@ -78,7 +78,7 @@ impl Movement {
|
||||
dist_addition += DIRECTION_CHANGE_BONUS / (self.last_strain_time + 16.0).sqrt()
|
||||
* bonus_factor
|
||||
* anti_flow_factor
|
||||
* (1.0 - (weighted_strain_time / 1000.0).powi(3)).max(0.0);
|
||||
* (1.0 - (weighted_strain_time / 1000.0).powf(3.0)).max(0.0);
|
||||
}
|
||||
|
||||
dist_addition += 12.5
|
||||
|
||||
@@ -472,7 +472,7 @@ impl CatchPerformanceInner {
|
||||
let max_combo = attributes.max_combo();
|
||||
|
||||
// Relying heavily on aim
|
||||
let mut pp = (5.0 * (stars / 0.0049).max(1.0) - 4.0).powi(2) / 100_000.0;
|
||||
let mut pp = (5.0 * (stars / 0.0049).max(1.0) - 4.0).powf(2.0) / 100_000.0;
|
||||
|
||||
let mut combo_hits = self.combo_hits();
|
||||
|
||||
@@ -490,7 +490,7 @@ impl CatchPerformanceInner {
|
||||
pp *= len_bonus;
|
||||
|
||||
// Penalize misses exponentially
|
||||
pp *= 0.97_f64.powi(self.state.n_misses as i32);
|
||||
pp *= 0.97_f64.powf(f64::from(self.state.n_misses));
|
||||
|
||||
// Combo scaling
|
||||
if self.state.max_combo > 0 {
|
||||
|
||||
Reference in New Issue
Block a user