added documentation
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::Mods;
|
||||
|
||||
/// Summary struct for a [`Beatmap`](crate::Beatmap)'s attributes.
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct BeatmapAttributes {
|
||||
pub ar: f32,
|
||||
@@ -27,6 +28,9 @@ impl BeatmapAttributes {
|
||||
}
|
||||
}
|
||||
|
||||
/// Adjusts attributes w.r.t. mods.
|
||||
/// AR is further adjusted by the its hitwindow.
|
||||
/// OD is __not__ adjusted by its hitwindow.
|
||||
pub fn mods(self, mods: impl Mods) -> Self {
|
||||
if !mods.change_map() {
|
||||
return self;
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
use std::cmp::Ordering;
|
||||
|
||||
/// New rhythm speed change.
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct TimingPoint {
|
||||
pub beat_len: f32,
|
||||
@@ -13,6 +14,7 @@ impl PartialOrd for TimingPoint {
|
||||
}
|
||||
}
|
||||
|
||||
/// [`TimingPoint`](crate::parse::TimingPoint) that depends on a previous one.
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
pub struct DifficultyPoint {
|
||||
pub time: f32,
|
||||
|
||||
@@ -2,6 +2,8 @@ use super::{PathType, Pos2};
|
||||
|
||||
use std::cmp::Ordering;
|
||||
|
||||
/// "Intermediate" hitobject created through parsing.
|
||||
/// Each mode will handle them differently.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct HitObject {
|
||||
pub pos: Pos2,
|
||||
@@ -43,6 +45,7 @@ impl PartialOrd for HitObject {
|
||||
}
|
||||
}
|
||||
|
||||
/// Further data related to specific object types.
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum HitObjectKind {
|
||||
Circle,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
use std::fmt;
|
||||
use std::ops;
|
||||
|
||||
/// Simple (x, y) coordinate
|
||||
#[derive(Clone, Copy, Default, PartialEq)]
|
||||
pub struct Pos2 {
|
||||
pub x: f32,
|
||||
|
||||
Reference in New Issue
Block a user