Struct rosu_pp::ManiaPP [−][src]
pub struct ManiaPP<'map> { /* fields omitted */ }
Expand description
Performance calculator on osu!mania maps.
Example
use rosu_pp::{ManiaPP, Beatmap};
let map: Beatmap = ...
let pp_result = ManiaPP::new(&map)
.mods(64) // DT
.score(765_432)
.calculate();
println!("PP: {} | Stars: {}", pp_result.pp(), pp_result.stars());
let next_result = ManiaPP::new(&map)
.attributes(pp_result) // reusing previous results for performance
.mods(8 + 64) // has to be the same to reuse attributes
.score(950_000)
.calculate();
println!("PP: {} | Stars: {}", next_result.pp(), next_result.stars());
Implementations
Provide the result of a previous difficulty or performance calculation. If you already calculated the attributes for the current map-mod combination, be sure to put them in here so that they don’t have to be recalculated.
Specify mods through their bit values.
Specify the score of a play.
On NoMod
its between 0 and 1,000,000, on Easy
between 0 and 500,000, etc.
Amount of passed objects for partial plays, e.g. a fail.
Be sure you also set score
or the final values
won’t be correct because it will incorrectly assume a score of 1,000,000.
If you want to calculate the performance after every few objects, instead of
using ManiaPP
multiple times with different passed_objects
, you should use
ManiaGradualPerformanceAttributes
.
Calculate all performance related values, including pp and stars.
Trait Implementations
Auto Trait Implementations
impl<'map> RefUnwindSafe for ManiaPP<'map>
impl<'map> UnwindSafe for ManiaPP<'map>
Blanket Implementations
Mutably borrows from an owned value. Read more