[][src]Struct libosu::Difficulty

pub struct Difficulty {
    pub hp_drain_rate: f32,
    pub circle_size: f32,
    pub overall_difficulty: f32,
    pub approach_rate: f32,
    pub slider_multiplier: f64,
    pub slider_tick_rate: u32,
}

Difficulty settings defined by the map.

Fields

hp_drain_rate: f32

HP Drain Rate

The wiki doesn't have a solid definition of this field yet.

circle_size: f32

Circle Size

This is a value between 0 and 10 representing how big circles should appear on screen.

In osu!mania, this actually defines the number of columns (keys).

overall_difficulty: f32

Overall Difficulty

approach_rate: f32

Approach Rate

slider_multiplier: f64

Slider Multiplier

slider_tick_rate: u32

Slider tick rate

Implementations

impl Difficulty[src]

pub fn circle_size_osupx(&self) -> f32[src]

Calculates the size of a circle in OsuPixels, which is how big the circle appears on a 640x480 screen.

The formula for this can be found here and is equal to 54.4 - 4.48 * cs.

pub fn approach_preempt(&self) -> u32[src]

Calculates the duration of time (in milliseconds) before the hit object's point of impact at which the object should begin fading in.

The formula for this can be found here and is a piecewise function:

  • AR < 5: preempt = 1200ms + 600ms * (5 - AR) / 5
  • AR = 5: preempt = 1200ms
  • AR > 5: preempt = 1200ms - 750ms * (AR - 5) / 5

pub fn approach_fade_time(&self) -> u32[src]

Calculates the duration of time (in milliseconds) it takes the hitobject to fade in completely to 100% opacity.

The formula for this can be found here and is a piecewise function:

  • AR < 5: fade_in = 800ms + 400ms * (5 - AR) / 5
  • AR = 5: fade_in = 800ms
  • AR > 5: fade_in = 800ms - 500ms * (AR - 5) / 5

Trait Implementations

impl Clone for Difficulty[src]

impl Debug for Difficulty[src]

impl Default for Difficulty[src]

impl PartialEq<Difficulty> for Difficulty[src]

impl StructuralPartialEq for Difficulty[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.