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