slight clarification in documentation
This commit is contained in:
@@ -22,7 +22,7 @@ let map = match Beatmap::parse(file) {
|
||||
|
||||
// The different modes make things annoying because their
|
||||
// pp calculations require different parameters.
|
||||
// For now, you will have to match on the mode yourself
|
||||
// You will have to match on the mode yourself
|
||||
// to be able to set all options for pp calculation.
|
||||
match map.mode {
|
||||
GameMode::STD => {
|
||||
@@ -31,7 +31,7 @@ match map.mode {
|
||||
.combo(1234)
|
||||
.misses(2)
|
||||
.accuracy(99.2)
|
||||
// `no_leniency` is the suggested default
|
||||
// `no_leniency::stars` is the suggested default
|
||||
.calculate(rosu_pp::osu::no_leniency::stars);
|
||||
|
||||
println!("PP: {}", result.pp());
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@
|
||||
//!
|
||||
//! // The different modes make things annoying because their
|
||||
//! // pp calculations require different parameters.
|
||||
//! // For now, you will have to match on the mode yourself
|
||||
//! // You will have to match on the mode yourself
|
||||
//! // to be able to set all options for pp calculation.
|
||||
//! match map.mode {
|
||||
//! GameMode::STD => {
|
||||
@@ -29,7 +29,7 @@
|
||||
//! .combo(1234)
|
||||
//! .misses(2)
|
||||
//! .accuracy(99.2)
|
||||
//! // `no_leniency` is the suggested default
|
||||
//! // `no_leniency::stars` is the suggested default
|
||||
//! .calculate(rosu_pp::osu::no_leniency::stars);
|
||||
//!
|
||||
//! println!("PP: {}", result.pp());
|
||||
|
||||
+2
-2
@@ -168,12 +168,12 @@ impl<'m> OsuPP<'m> {
|
||||
self
|
||||
}
|
||||
|
||||
/// Returns an object which contains the pp and [`DifficultyAttributes`](crate::fruits::DifficultyAttributes)
|
||||
/// Returns an object which contains the pp and [`DifficultyAttributes`](crate::osu::DifficultyAttributes)
|
||||
/// containing stars and other attributes.
|
||||
///
|
||||
/// `stars_func` will be used to calculate the difficulty attributes if not already given.
|
||||
/// Only called if `attributes` was not set.
|
||||
/// The default is suggested to be [`stars`](crate::osu::no_leniency::stars).
|
||||
/// The default is suggested to be [`no_leniency::stars`](crate::osu::no_leniency::stars).
|
||||
pub fn calculate(
|
||||
mut self,
|
||||
stars_func: impl FnOnce(&Beatmap, u32, Option<usize>) -> StarResult,
|
||||
|
||||
Reference in New Issue
Block a user