Skip to content

Commit fb798c8

Browse files
committed
fix: fix clippy suggestion for div_ceil
1 parent b5d890a commit fb798c8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

core/src/gameboy/sound_controller.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,8 +406,7 @@ impl SoundController {
406406
u64::MAX
407407
} else {
408408
let fs = self.sample_frequency;
409-
let next_sample = clock + (((CLOCK_SPEED - self.sample_mod) + fs - 1) / fs);
410-
// round up
409+
let next_sample = clock + (CLOCK_SPEED - self.sample_mod).div_ceil(fs);
411410
next_sample + (next_sample % 2 != 0) as u64
412411
};
413412
debug_assert!(clock < next_step);

0 commit comments

Comments
 (0)