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: f64,
}
Expand description

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: f64

Slider tick rate

Implementations

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.

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

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more