Merge branch 'sign-fix' of https://github.com/Tryibion/FlaxEngine into Tryibion-sign-fix
This commit is contained in:
@@ -395,7 +395,7 @@ namespace FlaxEngine
|
|||||||
/// <param name="f"></param>
|
/// <param name="f"></param>
|
||||||
public static double Sign(double f)
|
public static double Sign(double f)
|
||||||
{
|
{
|
||||||
return f < 0d ? -1d : 1d;
|
return f > 0.0d ? 1.0d : f < 0.0d ? -1.0d : 0.0d;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -548,7 +548,7 @@ namespace FlaxEngine
|
|||||||
/// <param name="f"></param>
|
/// <param name="f"></param>
|
||||||
public static float Sign(float f)
|
public static float Sign(float f)
|
||||||
{
|
{
|
||||||
return f < 0f ? -1f : 1f;
|
return f > 0.0f ? 1.0f : f < 0.0f ? -1.0f : 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Reference in New Issue
Block a user