Use redundancy test

This commit is contained in:
Alchyr
2020-04-08 01:42:35 -07:00
parent 66a474619c
commit 65823fb2e1
7 changed files with 32 additions and 10 deletions

View File

@ -25,6 +25,14 @@ namespace osu.Game.Beatmaps.ControlPoints
/// <returns>Whether equivalent.</returns>
public abstract bool EquivalentTo(ControlPoint other);
/// <summary>
/// Whether this control point results in a meaningful change when placed after another.
/// </summary>
/// <param name="other">Another control point to compare with.</param>
/// <param name="time">The time this timing point will be placed at.</param>
/// <returns>Whether redundant.</returns>
public abstract bool IsRedundant(ControlPoint other, double time);
public bool Equals(ControlPoint other) => Time == other?.Time && EquivalentTo(other);
}
}