mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 20:47:22 +08:00
Adjust lenience a little bit
This commit is contained in:
parent
797d03a65f
commit
e87be213d5
@ -46,6 +46,11 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
|
|
||||||
public struct ConvertValue : IEquatable<ConvertValue>
|
public struct ConvertValue : IEquatable<ConvertValue>
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// A sane value to account for osu!stable using ints everwhere.
|
||||||
|
/// </summary>
|
||||||
|
private const double conversion_lenience = 2;
|
||||||
|
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
public double StartTime;
|
public double StartTime;
|
||||||
[JsonProperty]
|
[JsonProperty]
|
||||||
@ -60,11 +65,11 @@ namespace osu.Game.Rulesets.Osu.Tests
|
|||||||
public float EndY;
|
public float EndY;
|
||||||
|
|
||||||
public bool Equals(ConvertValue other)
|
public bool Equals(ConvertValue other)
|
||||||
=> Precision.AlmostEquals(StartTime, other.StartTime, 1)
|
=> Precision.AlmostEquals(StartTime, other.StartTime)
|
||||||
&& Precision.AlmostEquals(EndTime, other.EndTime, 1)
|
&& Precision.AlmostEquals(EndTime, other.EndTime, conversion_lenience)
|
||||||
&& Precision.AlmostEquals(StartX, other.StartX, 1)
|
&& Precision.AlmostEquals(StartX, other.StartX)
|
||||||
&& Precision.AlmostEquals(StartY, other.StartY, 1)
|
&& Precision.AlmostEquals(StartY, other.StartY, conversion_lenience)
|
||||||
&& Precision.AlmostEquals(EndX, other.EndX, 1)
|
&& Precision.AlmostEquals(EndX, other.EndX, conversion_lenience)
|
||||||
&& Precision.AlmostEquals(EndY, other.EndY, 1);
|
&& Precision.AlmostEquals(EndY, other.EndY, conversion_lenience);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user