diff --git a/Source/Engine/Core/Math/Matrix.cs b/Source/Engine/Core/Math/Matrix.cs
index c065379d3..71edef415 100644
--- a/Source/Engine/Core/Math/Matrix.cs
+++ b/Source/Engine/Core/Math/Matrix.cs
@@ -215,23 +215,9 @@ namespace FlaxEngine
}
///
- /// Gets or sets the forward of the matrix; that is -M31, -M32, and -M33.
+ /// Gets or sets the forward of the matrix; that is M31, M32, and M33.
///
public Float3 Forward
- {
- get => new Float3(-M31, -M32, -M33);
- set
- {
- M31 = -value.X;
- M32 = -value.Y;
- M33 = -value.Z;
- }
- }
-
- ///
- /// Gets or sets the backward of the matrix; that is M31, M32, and M33.
- ///
- public Float3 Backward
{
get => new Float3(M31, M32, M33);
set
@@ -242,6 +228,20 @@ namespace FlaxEngine
}
}
+ ///
+ /// Gets or sets the backward of the matrix; that is -M31, -M32, and -M33.
+ ///
+ public Float3 Backward
+ {
+ get => new Float3(-M31, -M32, -M33);
+ set
+ {
+ M31 = -value.X;
+ M32 = -value.Y;
+ M33 = -value.Z;
+ }
+ }
+
///
/// Initializes a new instance of the struct.
///
diff --git a/Source/Engine/Core/Math/Matrix.h b/Source/Engine/Core/Math/Matrix.h
index 0eddc173b..e71da993a 100644
--- a/Source/Engine/Core/Math/Matrix.h
+++ b/Source/Engine/Core/Math/Matrix.h
@@ -210,31 +210,31 @@ public:
// Gets the forward Float3 of the matrix; that is -M31, -M32, and -M33.
Float3 GetForward() const
{
- return -Float3(M31, M32, M33);
+ return Float3(M31, M32, M33);
}
// Sets the forward Float3 of the matrix; that is -M31, -M32, and -M33.
void SetForward(const Float3& value)
- {
- M31 = -value.X;
- M32 = -value.Y;
- M33 = -value.Z;
- }
-
- // Gets the backward Float3 of the matrix; that is M31, M32, and M33.
- Float3 GetBackward() const
- {
- return Float3(M31, M32, M33);
- }
-
- // Sets the backward Float3 of the matrix; that is M31, M32, and M33.
- void SetBackward(const Float3& value)
{
M31 = value.X;
M32 = value.Y;
M33 = value.Z;
}
+ // Gets the backward Float3 of the matrix; that is -M31, -M32, and -M33.
+ Float3 GetBackward() const
+ {
+ return Float3(-M31, -M32, -M33);
+ }
+
+ // Sets the backward Float3 of the matrix; that is -M31, -M32, and -M33.
+ void SetBackward(const Float3& value)
+ {
+ M31 = -value.X;
+ M32 = -value.Y;
+ M33 = -value.Z;
+ }
+
// Gets the first row in the matrix; that is M11, M12, M13, and M14.
Float4 GetRow1() const
{
diff --git a/Source/Engine/Core/Math/Matrix3x3.cs b/Source/Engine/Core/Math/Matrix3x3.cs
index b19d80490..970ec6cec 100644
--- a/Source/Engine/Core/Math/Matrix3x3.cs
+++ b/Source/Engine/Core/Math/Matrix3x3.cs
@@ -303,9 +303,6 @@ namespace FlaxEngine
///
/// Gets a value indicating whether this instance is an identity Matrix3x3.
///
- ///
- /// true if this instance is an identity Matrix3x3; otherwise, false.
- ///
public bool IsIdentity => Equals(Identity);
///
@@ -566,19 +563,19 @@ namespace FlaxEngine
///
public bool DecomposeUniformScale(out float scale, out Quaternion rotation)
{
- //Scaling is the length of the rows. ( just take one row since this is a uniform matrix)
+ // Scaling is the length of the rows. ( just take one row since this is a uniform matrix)
scale = (float)Math.Sqrt((M11 * M11) + (M12 * M12) + (M13 * M13));
var invScale = 1f / scale;
- //If any of the scaling factors are zero, then the rotation matrix can not exist.
+ // If any of the scaling factors are zero, then the rotation matrix can not exist
if (Math.Abs(scale) < Mathf.Epsilon)
{
rotation = Quaternion.Identity;
return false;
}
- //The rotation is the left over matrix after dividing out the scaling.
- Matrix3x3 rotationmatrix = new Matrix3x3
+ // The rotation is the leftover matrix after dividing out the scaling
+ var rotationMatrix = new Matrix3x3
{
M11 = M11 * invScale,
M12 = M12 * invScale,
@@ -590,8 +587,7 @@ namespace FlaxEngine
M32 = M32 * invScale,
M33 = M33 * invScale
};
-
- Quaternion.RotationMatrix(ref rotationmatrix, out rotation);
+ Quaternion.RotationMatrix(ref rotationMatrix, out rotation);
return true;
}
diff --git a/Source/Engine/Core/Math/Matrix3x3.h b/Source/Engine/Core/Math/Matrix3x3.h
index f5f8cd998..cb5ae04a2 100644
--- a/Source/Engine/Core/Math/Matrix3x3.h
+++ b/Source/Engine/Core/Math/Matrix3x3.h
@@ -175,34 +175,34 @@ public:
M13 = -value.Z;
}
- // Gets the forward Float3 of the matrix; that is -M31, -M32, and -M33.
+ // Gets the forward Float3 of the matrix; that is M31, M32, and M33.
Float3 GetForward() const
{
return -Float3(M31, M32, M33);
}
- // Sets the forward Float3 of the matrix; that is -M31, -M32, and -M33.
+ // Sets the forward Float3 of the matrix; that is M31, M32, and M33.
void SetForward(const Float3& value)
- {
- M31 = -value.X;
- M32 = -value.Y;
- M33 = -value.Z;
- }
-
- // Gets the backward Float3 of the matrix; that is M31, M32, and M33.
- Float3 GetBackward() const
- {
- return Float3(M31, M32, M33);
- }
-
- // Sets the backward Float3 of the matrix; that is M31, M32, and M33.
- void SetBackward(const Float3& value)
{
M31 = value.X;
M32 = value.Y;
M33 = value.Z;
}
+ // Gets the backward Float3 of the matrix; that is -M31, -M32, and -M33.
+ Float3 GetBackward() const
+ {
+ return Float3(-M31, -M32, -M33);
+ }
+
+ // Sets the backward Float3 of the matrix; that is -M31, -M32, and -M33.
+ void SetBackward(const Float3& value)
+ {
+ M31 = -value.X;
+ M32 = -value.Y;
+ M33 = -value.Z;
+ }
+
// Gets the first row in the matrix; that is M11, M12 and M13.
Float3 GetRow1() const
{