added more attribute conversions

This commit is contained in:
MaxOhn
2024-02-29 23:36:19 +01:00
parent 852f6cfa45
commit dfb580f201
4 changed files with 38 additions and 0 deletions
+11
View File
@@ -86,4 +86,15 @@ impl OsuPerformanceAttributes {
pub const fn n_objects(&self) -> u32 {
self.difficulty.n_objects()
}
/// Returns a builder for performance calculation.
pub const fn performance<'a>(self) -> OsuPerformance<'a> {
OsuPerformance::from_osu_attributes(self.difficulty)
}
}
impl From<OsuPerformanceAttributes> for OsuDifficultyAttributes {
fn from(attributes: OsuPerformanceAttributes) -> Self {
attributes.difficulty
}
}