Struct rosu_pp::taiko::TaikoPP [−][src]
pub struct TaikoPP<'m> { /* fields omitted */ }
Calculator for pp on osu!taiko maps.
Example
let map: Beatmap = ... let pp_result: PpResult = TaikoPP::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 = TaikoPP::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> TaikoPP<'m>
[src]
impl<'m> TaikoPP<'m>
[src]pub fn new(map: &'m Beatmap) -> Self
[src]
pub fn attributes(self, attributes: impl TaikoAttributeProvider) -> Self
[src]
TaikoAttributeProvider
is implemented by f32
, StarResult
,
and by PpResult
meaning you can give the star rating,
the result of a star calculation, or the result of a pp calculation.
If you already calculated the stars 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 n300(self, n300: usize) -> Self
[src]
Specify the amount of 300s of a play.
pub fn n100(self, n100: usize) -> Self
[src]
Specify the amount of 100s of a play.
pub fn misses(self, n_misses: usize) -> Self
[src]
Specify the amount of misses of the play.
pub fn accuracy(self, acc: f32) -> Self
[src]
Set the accuracy between 0.0 and 100.0.
pub fn passed_objects(self, passed_objects: usize) -> Self
[src]
Amount of passed objects for partial plays, e.g. a fail.
pub fn calculate(self) -> PpResult
[src]
Returns an object which contains the pp and stars.
Trait Implementations
Auto Trait Implementations
impl<'m> RefUnwindSafe for TaikoPP<'m>
impl<'m> RefUnwindSafe for TaikoPP<'m>
impl<'m> UnwindSafe for TaikoPP<'m>
impl<'m> UnwindSafe for TaikoPP<'m>