Core/Refactor: Part 2

This commit is contained in:
hondacrx
2018-05-07 22:07:35 -04:00
parent 216db1c23a
commit 9b40067017
93 changed files with 321 additions and 388 deletions
+1 -1
View File
@@ -174,7 +174,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("AxisAlignedBox(Min={0}, Max={1})", _lo, _hi);
return $"AxisAlignedBox(Min={_lo}, Max={_hi})";
}
#endregion
+1 -2
View File
@@ -449,8 +449,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("2x2[{0}, {1}, {2}, {3}]",
_m11, _m12, _m21, _m22);
return $"2x2[{_m11}, {_m12}, {_m21}, {_m22}]";
}
#endregion
+1 -2
View File
@@ -633,8 +633,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("3x3[{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}]",
_m11, _m12, _m13, _m21, _m22, _m23, _m31, _m32, _m33);
return $"3x3[{_m11}, {_m12}, {_m13}, {_m21}, {_m22}, {_m23}, {_m31}, {_m32}, {_m33}]";
}
#endregion
+2 -2
View File
@@ -705,8 +705,8 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("4x4[{0}, {1}, {2}, {3}, {4}, {5}, {6}, {7}, {8}, {9}, {10}, {11}, {12}, {13}, {14}, {15}]",
_m11, _m12, _m13, _m14, _m21, _m22, _m23, _m24, _m31, _m32, _m33, _m34, _m41, _m42, _m43, _m44);
return
$"4x4[{_m11}, {_m12}, {_m13}, {_m14}, {_m21}, {_m22}, {_m23}, {_m24}, {_m31}, {_m32}, {_m33}, {_m34}, {_m41}, {_m42}, {_m43}, {_m44}]";
}
#endregion
+2 -2
View File
@@ -205,7 +205,7 @@ namespace Framework.GameMath
/// <returns>A float representing the shortest distance from the given vector to the plane.</returns>
public float GetDistanceToPlane(Vector3 p)
{
return Vector3.DotProduct(p, this.Normal) - this.Constant;
return Vector3.DotProduct(p, Normal) - Constant;
}
public void getEquation(ref Vector3 n, out float d)
@@ -253,7 +253,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("Plane[n={0}, c={1}]", _normal.ToString(), _const.ToString());
return $"Plane[n={_normal.ToString()}, c={_const.ToString()}]";
}
#endregion
}
+1 -1
View File
@@ -648,7 +648,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("({0}, {1}, {2}, {3})", _w, _x, _y, _z);
return $"({_w}, {_x}, {_y}, {_z})";
}
#endregion
+1 -1
View File
@@ -164,7 +164,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("({0}, {1})", _origin, _direction);
return $"({_origin}, {_direction})";
}
#endregion
+1 -1
View File
@@ -569,7 +569,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("({0}, {1})", _x, _y);
return $"({_x}, {_y})";
}
#endregion
+1 -1
View File
@@ -594,7 +594,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("({0}, {1}, {2})", X, Y, Z);
return $"({X}, {Y}, {Z})";
}
#endregion
+1 -1
View File
@@ -617,7 +617,7 @@ namespace Framework.GameMath
/// <returns>A string representation of this object.</returns>
public override string ToString()
{
return string.Format("({0}, {1}, {2}, {3})", _x, _y, _z, _w);
return $"({_x}, {_y}, {_z}, {_w})";
}
#endregion