Struct rosu_pp::FruitsPP [−][src]
pub struct FruitsPP<'map> { /* fields omitted */ }
Expand description
Performance calculator on osu!ctb maps.
Example
use rosu_pp::{FruitsPP, Beatmap};
let map: Beatmap = ...
let pp_result = FruitsPP::new(&map)
.mods(8 + 64) // HDDT
.combo(1234)
.misses(1)
.accuracy(98.5)
.calculate();
println!("PP: {} | Stars: {}", pp_result.pp(), pp_result.stars());
let next_result = FruitsPP::new(&map)
.attributes(pp_result) // reusing previous results for performance
.mods(8 + 64) // has to be the same to reuse attributes
.accuracy(99.5)
.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 amount of droplets of a play i.e. n100.
Specify the amount of tiny droplets of a play i.e. n50.
Specify the amount of tiny droplet misses of a play i.e. n_katu.
Specify the amount of fruit / droplet misses of the play.
Amount of passed objects for partial plays, e.g. a fail.
If you want to calculate the performance after every few objects, instead of
using FruitsPP
multiple times with different passed_objects
, you should use
FruitsGradualPerformanceAttributes
.
Provide parameters through an FruitsScoreState
.
Generate the hit results with respect to the given accuracy between 0
and 100
.
Be sure to set misses
beforehand! Also, if available, set attributes
beforehand.
Calculate all performance related values, including pp and stars.
Trait Implementations
Auto Trait Implementations
impl<'map> RefUnwindSafe for FruitsPP<'map>
impl<'map> UnwindSafe for FruitsPP<'map>
Blanket Implementations
Mutably borrows from an owned value. Read more