fix reading clockrate
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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 };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user