mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 13:22:55 +08:00
Add xmldoc
This commit is contained in:
parent
c0a78924aa
commit
0015f627b0
@ -316,6 +316,11 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Estimate the centre of mass of a slider relative to its start position.
|
||||
/// </summary>
|
||||
/// <param name="slider">The slider to process.</param>
|
||||
/// <returns>The centre of mass of the slider.</returns>
|
||||
private static Vector2 calculateCentreOfMass(Slider slider)
|
||||
{
|
||||
if (slider.Distance < 1) return Vector2.Zero;
|
||||
@ -333,6 +338,11 @@ namespace osu.Game.Rulesets.Osu.Utils
|
||||
return sum / count;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the absolute rotation of a slider, defined as the angle from its start position to its end position.
|
||||
/// </summary>
|
||||
/// <param name="slider">The slider to process.</param>
|
||||
/// <returns>The angle in radians.</returns>
|
||||
private static float getSliderRotation(Slider slider)
|
||||
{
|
||||
var endPositionVector = slider.EndPosition - slider.Position;
|
||||
|
Loading…
Reference in New Issue
Block a user