Struct rosu_pp::FruitsPP [−][src]
pub struct FruitsPP<'m> { /* fields omitted */ }
Calculator for pp on osu!ctb maps.
Example
let map: Beatmap = ... let pp_result: PpResult = 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
impl<'m> FruitsPP<'m>
[src]
impl<'m> FruitsPP<'m>
[src]pub fn new(map: &'m Beatmap) -> Self
[src]
pub fn attributes(self, attributes: impl FruitsAttributeProvider) -> Self
[src]
FruitsAttributeProvider
is implemented by DifficultyAttributes
,
StarResult
, and by PpResult
meaning you can give the
result of a star calculation or a pp 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.
pub fn mods(self, mods: u32) -> Self
[src]
Specify mods through their bit values.
pub fn combo(self, combo: usize) -> Self
[src]
Specify the max combo of the play.
pub fn fruits(self, n_fruits: usize) -> Self
[src]
Specify the amount of fruits of a play i.e. n300.
pub fn droplets(self, n_droplets: usize) -> Self
[src]
Specify the amount of droplets of a play i.e. n100.
pub fn tiny_droplets(self, n_tiny_droplets: usize) -> Self
[src]
Specify the amount of tiny droplets of a play i.e. n50.
pub fn tiny_droplet_misses(self, n_tiny_droplet_misses: usize) -> Self
[src]
Specify the amount of tiny droplet misses of a play i.e. n_katu.
pub fn misses(self, n_misses: usize) -> Self
[src]
Specify the amount of fruit / droplet misses of the play.
pub fn passed_objects(self, passed_objects: usize) -> Self
[src]
Amount of passed objects for partial plays, e.g. a fail.
pub fn accuracy(self, acc: f32) -> Self
[src]
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.
pub fn calculate(self) -> PpResult
[src]
Returns an object which contains the pp and DifficultyAttributes
containing stars and other attributes.
Trait Implementations
Auto Trait Implementations
impl<'m> RefUnwindSafe for FruitsPP<'m>
impl<'m> RefUnwindSafe for FruitsPP<'m>
impl<'m> UnwindSafe for FruitsPP<'m>
impl<'m> UnwindSafe for FruitsPP<'m>