1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-05 10:33:22 +08:00

use direct instead of linq

This commit is contained in:
Jay Lawton 2024-12-01 17:48:11 +10:00
parent ed4449d118
commit 981653a55e
3 changed files with 9 additions and 6 deletions

View File

@ -1,3 +1,5 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Difficulty.Utils;
using osu.Game.Rulesets.Taiko.Difficulty.Preprocessing;
@ -35,8 +37,7 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Evaluators
/// <returns>The calculated object density.</returns>
public static double CalculateObjectDensity(TaikoDifficultyHitObject noteObject)
{
return 150 - (150 - 50)
* DifficultyCalculationUtils.Logistic(noteObject.DeltaTime, 200, 1.0 / 30);
return 50 * DifficultyCalculationUtils.Logistic(noteObject.DeltaTime, 200, 1.0 / 30);
}
}
}

View File

@ -2,7 +2,6 @@
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using System.Linq;
using osu.Game.Rulesets.Difficulty.Preprocessing;
namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Rhythm.Data
@ -12,19 +11,19 @@ namespace osu.Game.Rulesets.Taiko.Difficulty.Preprocessing.Rhythm.Data
/// </summary>
public class EvenHitObjects : EvenRhythm<TaikoDifficultyHitObject>, IHasInterval
{
public TaikoDifficultyHitObject FirstHitObject => Children.First();
public TaikoDifficultyHitObject FirstHitObject => Children[0];
public EvenHitObjects? Previous;
/// <summary>
/// <see cref="DifficultyHitObject.StartTime"/> of the first hit object.
/// </summary>
public double StartTime => Children.First().StartTime;
public double StartTime => Children[0].StartTime;
/// <summary>
/// The interval between the first and final hit object within this group.
/// </summary>
public double Duration => Children.Last().StartTime - Children.First().StartTime;
public double Duration => Children[^1].StartTime - Children[0].StartTime;
/// <summary>
/// The interval in ms of each hit object in this <see cref="EvenHitObjects"/>. This is only defined if there is

View File

@ -1,3 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using osu.Game.Rulesets.Difficulty.Preprocessing;
using osu.Game.Rulesets.Difficulty.Skills;
using osu.Game.Rulesets.Mods;