Skip to content

Commit e17e882

Browse files
authored
feat!: add HitResultPriority::Fastest variant (#58)
* feat!: add HitResultPriority::Fastest variant * fix: osu std hitresult calc * fix: consider slider value * test: remove linux test cases The underlying math lib on linux is inherently different for C# and Rust so there is no point in asserting equality. Specifically, Math.Cbrt(7512727.819502543) resulted in a different value than the analogous f64::cbrt, i.e. 195.854047766587 in C# vs 195.85404776658697 in Rust).
1 parent 30256b8 commit e17e882

File tree

7 files changed

+565
-651
lines changed

7 files changed

+565
-651
lines changed

src/any/performance/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -434,11 +434,14 @@ impl<'map> Performance<'map> {
434434

435435
/// While generating remaining hitresults, decide how they should be distributed.
436436
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
437+
#[non_exhaustive]
437438
pub enum HitResultPriority {
438439
/// Prioritize good hitresults over bad ones
439440
BestCase,
440441
/// Prioritize bad hitresults over good ones
441442
WorstCase,
443+
/// Prioritize fast hitresults generation
444+
Fastest,
442445
}
443446

444447
impl HitResultPriority {

src/catch/performance/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ impl<'map> CatchPerformance<'map> {
347347
let max_tiny_droplets =
348348
cmp::min(attrs.n_tiny_droplets, raw_tiny_droplets.ceil() as u32);
349349

350+
// Hopefully using `HitResultPriority::Fastest` wouldn't make a big
351+
// difference here so let's be lazy and ignore it
350352
for n_tiny_droplets in min_tiny_droplets..=max_tiny_droplets {
351353
let n_tiny_droplet_misses = attrs.n_tiny_droplets - n_tiny_droplets;
352354

0 commit comments

Comments
 (0)