mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Changed epsilon
This commit is contained in:
@ -10,6 +10,7 @@ using NUnit.Framework;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
using osu.Game.Graphics.Sprites;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
@ -188,7 +189,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Aspect ratio check
|
// Aspect ratio check
|
||||||
if (!isNearlyZero(childScale.X - childScale.Y, 0.0001f))
|
if (!isNearlyZero(childScale.X - childScale.Y))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// ScalingMode check
|
// ScalingMode check
|
||||||
@ -237,7 +238,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool isNearlyZero(float f, float epsilon = 0.00001f)
|
private bool isNearlyZero(float f, float epsilon = Precision.FLOAT_EPSILON)
|
||||||
{
|
{
|
||||||
return f < epsilon;
|
return f < epsilon;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user