fixed od flooring
This commit is contained in:
+2
-2
@@ -54,7 +54,7 @@ fn custom_osu() {
|
||||
|
||||
use crate::{Beatmap, OsuPP};
|
||||
|
||||
let path = "E:Games/osu!/beatmaps/1402167_.osu";
|
||||
let path = "E:Games/osu!/beatmaps/1402167.osu";
|
||||
let file = File::open(path).unwrap();
|
||||
|
||||
let start = Instant::now();
|
||||
@@ -76,7 +76,7 @@ fn custom_osu() {
|
||||
println!("Parsing average: {:?}", accum / iters);
|
||||
|
||||
let start = Instant::now();
|
||||
let result = OsuPP::new(&map).mods(1024).calculate();
|
||||
let result = OsuPP::new(&map).mods(64 + 16).calculate();
|
||||
|
||||
let iters = 100;
|
||||
let accum = start.elapsed();
|
||||
|
||||
@@ -47,8 +47,7 @@ pub fn stars(
|
||||
let take = passed_objects.unwrap_or_else(|| map.hit_objects.len());
|
||||
|
||||
let map_attributes = map.attributes().mods(mods);
|
||||
let hit_window =
|
||||
super::difficulty_range_od(map_attributes.od).floor() / map_attributes.clock_rate;
|
||||
let hit_window = super::difficulty_range_od(map_attributes.od) / map_attributes.clock_rate;
|
||||
let od = (80.0 - hit_window) / 6.0;
|
||||
|
||||
let mut diff_attributes = DifficultyAttributes {
|
||||
@@ -245,8 +244,7 @@ pub fn stars(
|
||||
/// Suitable to plot the difficulty of a map over time.
|
||||
pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
|
||||
let map_attributes = map.attributes().mods(mods);
|
||||
let hit_window =
|
||||
super::difficulty_range_od(map_attributes.od).floor() / map_attributes.clock_rate;
|
||||
let hit_window = super::difficulty_range_od(map_attributes.od) / map_attributes.clock_rate;
|
||||
let od = (80.0 - hit_window) / 6.0;
|
||||
|
||||
let mut diff_attributes = DifficultyAttributes {
|
||||
|
||||
@@ -213,8 +213,7 @@ pub fn stars(
|
||||
/// Suitable to plot the difficulty of a map over time.
|
||||
pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
|
||||
let map_attributes = map.attributes().mods(mods);
|
||||
let hit_window =
|
||||
super::difficulty_range_od(map_attributes.od).floor() / map_attributes.clock_rate;
|
||||
let hit_window = super::difficulty_range_od(map_attributes.od) / map_attributes.clock_rate;
|
||||
let od = (80.0 - hit_window) / 6.0;
|
||||
|
||||
let mut diff_attributes = DifficultyAttributes {
|
||||
|
||||
@@ -42,7 +42,7 @@ pub fn stars(
|
||||
let take = passed_objects.unwrap_or_else(|| map.hit_objects.len());
|
||||
|
||||
let attributes = map.attributes().mods(mods);
|
||||
let hit_window = super::difficulty_range_od(attributes.od).floor() / attributes.clock_rate;
|
||||
let hit_window = super::difficulty_range_od(attributes.od) / attributes.clock_rate;
|
||||
let od = (80.0 - hit_window) / 6.0;
|
||||
|
||||
if take < 2 {
|
||||
@@ -219,7 +219,7 @@ pub fn stars(
|
||||
/// Suitable to plot the difficulty of a map over time.
|
||||
pub fn strains(map: &Beatmap, mods: impl Mods) -> Strains {
|
||||
let attributes = map.attributes().mods(mods);
|
||||
let hit_window = super::difficulty_range_od(attributes.od).floor() / attributes.clock_rate;
|
||||
let hit_window = super::difficulty_range_od(attributes.od) / attributes.clock_rate;
|
||||
|
||||
if map.hit_objects.len() < 2 {
|
||||
return Strains::default();
|
||||
|
||||
Reference in New Issue
Block a user