Adjust epsilon in IsNormalized checks to be less strict
This commit is contained in:
@@ -179,7 +179,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathd.Abs((X * X + Y * Y) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathd.Abs((X * X + Y * Y) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
@@ -234,7 +234,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathd.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathd.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the normalized vector. Returned vector has length equal 1.
|
/// Gets the normalized vector. Returned vector has length equal 1.
|
||||||
|
|||||||
@@ -220,7 +220,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathd.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathd.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathf.Abs((X * X + Y * Y) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathf.Abs((X * X + Y * Y) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
@@ -228,7 +228,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the normalized vector. Returned vector has length equal 1.
|
/// Gets the normalized vector. Returned vector has length equal 1.
|
||||||
|
|||||||
@@ -202,7 +202,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathf.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the euler angle (pitch, yaw, roll) in degrees.
|
/// Gets the euler angle (pitch, yaw, roll) in degrees.
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ public:
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
bool IsNormalized() const
|
bool IsNormalized() const
|
||||||
{
|
{
|
||||||
return Math::Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-4f;
|
return Math::Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathr.Abs((X * X + Y * Y) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathr.Abs((X * X + Y * Y) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ public:
|
|||||||
// Gets a value indicting whether this instance is normalized.
|
// Gets a value indicting whether this instance is normalized.
|
||||||
bool IsNormalized() const
|
bool IsNormalized() const
|
||||||
{
|
{
|
||||||
return Math::Abs((X * X + Y * Y) - 1.0f) < 1e-4f;
|
return Math::Abs((X * X + Y * Y) - 1.0f) < 1e-3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets a value indicting whether this vector is zero.
|
// Gets a value indicting whether this vector is zero.
|
||||||
|
|||||||
@@ -256,7 +256,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathr.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathr.Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets the normalized vector. Returned vector has length equal 1.
|
/// Gets the normalized vector. Returned vector has length equal 1.
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public:
|
|||||||
// Gets a value indicting whether this instance is normalized.
|
// Gets a value indicting whether this instance is normalized.
|
||||||
bool IsNormalized() const
|
bool IsNormalized() const
|
||||||
{
|
{
|
||||||
return Math::Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-4f;
|
return Math::Abs((X * X + Y * Y + Z * Z) - 1.0f) < 1e-3f;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gets a value indicting whether this vector is zero.
|
// Gets a value indicting whether this vector is zero.
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ namespace FlaxEngine
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this instance is normalized.
|
/// Gets a value indicting whether this instance is normalized.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsNormalized => Mathr.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-4f;
|
public bool IsNormalized => Mathr.Abs((X * X + Y * Y + Z * Z + W * W) - 1.0f) < 1e-3f;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets a value indicting whether this vector is zero
|
/// Gets a value indicting whether this vector is zero
|
||||||
|
|||||||
Reference in New Issue
Block a user