fix reading clockrate

This commit is contained in:
MaxOhn
2024-03-07 11:46:23 +01:00
parent c7f2e9a993
commit b81fc5c0d5
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -335,7 +335,7 @@ impl Difficulty {
}
fn non_zero_u32_to_f64(n: NonZeroU32) -> f64 {
f64::from_bits(u64::from(n.get()))
f64::from(f32::from_bits(n.get()))
}
impl Debug for Difficulty {
+1 -1
View File
@@ -187,7 +187,7 @@ impl BeatmapAttributesBuilder {
pub fn hit_windows(&self) -> HitWindows {
let mods = self.mods;
let clock_rate = self.clock_rate.unwrap_or_else(|| mods.clock_rate());
let clock_rate = self.clock_rate.unwrap_or(mods.clock_rate());
let ar_clock_rate = if self.ar.with_mods { 1.0 } else { clock_rate };
let od_clock_rate = if self.ar.with_mods { 1.0 } else { clock_rate };