chore: made clippy happy
This commit is contained in:
@@ -44,18 +44,6 @@ impl<'a> JuiceStream<'a> {
|
||||
|
||||
let path = slider.curve(GameMode::Catch, &mut bufs.curve);
|
||||
|
||||
fn get_precision_adjusted_beat_len(slider_velocity_multiplier: f64, beat_len: f64) -> f64 {
|
||||
let slider_velocity_as_beat_len = -100.0 / slider_velocity_multiplier;
|
||||
|
||||
let bpm_multiplier = if slider_velocity_as_beat_len < 0.0 {
|
||||
f64::from(((-slider_velocity_as_beat_len) as f32).clamp(10.0, 10_000.0)) / 100.0
|
||||
} else {
|
||||
1.0
|
||||
};
|
||||
|
||||
beat_len * bpm_multiplier
|
||||
}
|
||||
|
||||
let velocity = JuiceStream::BASE_SCORING_DIST * slider_multiplier
|
||||
/ get_precision_adjusted_beat_len(slider_velocity, beat_len);
|
||||
let scoring_dist = velocity * beat_len;
|
||||
@@ -171,3 +159,15 @@ pub struct JuiceStreamBufs {
|
||||
pub curve: CurveBuffers,
|
||||
pub ticks: Vec<SliderEvent>,
|
||||
}
|
||||
|
||||
fn get_precision_adjusted_beat_len(slider_velocity_multiplier: f64, beat_len: f64) -> f64 {
|
||||
let slider_velocity_as_beat_len = -100.0 / slider_velocity_multiplier;
|
||||
|
||||
let bpm_multiplier = if slider_velocity_as_beat_len < 0.0 {
|
||||
f64::from(((-slider_velocity_as_beat_len) as f32).clamp(10.0, 10_000.0)) / 100.0
|
||||
} else {
|
||||
1.0
|
||||
};
|
||||
|
||||
beat_len * bpm_multiplier
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ impl<'map> CatchPerformance<'map> {
|
||||
///
|
||||
/// The argument `map_or_attrs` must be either
|
||||
/// - previously calculated attributes ([`CatchDifficultyAttributes`]
|
||||
/// or [`CatchPerformanceAttributes`])
|
||||
/// or [`CatchPerformanceAttributes`])
|
||||
/// - a beatmap ([`CatchBeatmap<'map>`])
|
||||
///
|
||||
/// If a map is given, difficulty attributes will need to be calculated
|
||||
|
||||
Reference in New Issue
Block a user