renamed method

This commit is contained in:
MaxOhn
2024-02-10 03:39:36 +01:00
parent a8bf9601b6
commit c793361e0f
8 changed files with 93 additions and 9 deletions
+12
View File
@@ -5,6 +5,8 @@ use rosu_map::{
LATEST_FORMAT_VERSION,
};
use crate::{Performance, Difficulty};
pub use self::{
attributes::{BeatmapAttributes, BeatmapAttributesBuilder, HitWindows},
converted::Converted,
@@ -68,6 +70,16 @@ impl Beatmap {
rosu_map::from_bytes(bytes)
}
/// Create a new difficulty calculator for this [`Beatmap`].
pub fn difficulty(&self) -> Difficulty<'_> {
Difficulty::new(self)
}
/// Create a new performance calculator for this [`Beatmap`].
pub fn performance(&self) -> Performance<'_> {
Performance::new(self)
}
/// Finds the [`TimingPoint`] that is active at the given time.
pub(crate) fn timing_point_at(&self, time: f64) -> Option<&TimingPoint> {
timing_point_at(&self.timing_points, time)