Cleanup 3

This commit is contained in:
W2.Wizard
2021-02-21 11:09:04 +01:00
parent 92fafe877c
commit 20ba37e223
24 changed files with 181 additions and 119 deletions

View File

@@ -1205,7 +1205,7 @@ namespace FlaxEngine
while (true)
{
if ((exponent & 1) != 0)
identity = identity * temp;
identity *= temp;
exponent /= 2;
@@ -1517,14 +1517,14 @@ namespace FlaxEngine
//By separating the above algorithm into multiple lines, we actually increase accuracy.
result = value;
result.Row2 = result.Row2 - Vector4.Dot(result.Row1, result.Row2) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row2 -= Vector4.Dot(result.Row1, result.Row2) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row3 = result.Row3 - Vector4.Dot(result.Row1, result.Row3) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row3 = result.Row3 - Vector4.Dot(result.Row2, result.Row3) / Vector4.Dot(result.Row2, result.Row2) * result.Row2;
result.Row3 -= Vector4.Dot(result.Row1, result.Row3) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row3 -= Vector4.Dot(result.Row2, result.Row3) / Vector4.Dot(result.Row2, result.Row2) * result.Row2;
result.Row4 = result.Row4 - Vector4.Dot(result.Row1, result.Row4) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row4 = result.Row4 - Vector4.Dot(result.Row2, result.Row4) / Vector4.Dot(result.Row2, result.Row2) * result.Row2;
result.Row4 = result.Row4 - Vector4.Dot(result.Row3, result.Row4) / Vector4.Dot(result.Row3, result.Row3) * result.Row3;
result.Row4 -= Vector4.Dot(result.Row1, result.Row4) / Vector4.Dot(result.Row1, result.Row1) * result.Row1;
result.Row4 -= Vector4.Dot(result.Row2, result.Row4) / Vector4.Dot(result.Row2, result.Row2) * result.Row2;
result.Row4 -= Vector4.Dot(result.Row3, result.Row4) / Vector4.Dot(result.Row3, result.Row3) * result.Row3;
}
/// <summary>
@@ -1594,16 +1594,16 @@ namespace FlaxEngine
result.Row1 = Vector4.Normalize(result.Row1);
result.Row2 = result.Row2 - Vector4.Dot(result.Row1, result.Row2) * result.Row1;
result.Row2 -= Vector4.Dot(result.Row1, result.Row2) * result.Row1;
result.Row2 = Vector4.Normalize(result.Row2);
result.Row3 = result.Row3 - Vector4.Dot(result.Row1, result.Row3) * result.Row1;
result.Row3 = result.Row3 - Vector4.Dot(result.Row2, result.Row3) * result.Row2;
result.Row3 -= Vector4.Dot(result.Row1, result.Row3) * result.Row1;
result.Row3 -= Vector4.Dot(result.Row2, result.Row3) * result.Row2;
result.Row3 = Vector4.Normalize(result.Row3);
result.Row4 = result.Row4 - Vector4.Dot(result.Row1, result.Row4) * result.Row1;
result.Row4 = result.Row4 - Vector4.Dot(result.Row2, result.Row4) * result.Row2;
result.Row4 = result.Row4 - Vector4.Dot(result.Row3, result.Row4) * result.Row3;
result.Row4 -= Vector4.Dot(result.Row1, result.Row4) * result.Row1;
result.Row4 -= Vector4.Dot(result.Row2, result.Row4) * result.Row2;
result.Row4 -= Vector4.Dot(result.Row3, result.Row4) * result.Row3;
result.Row4 = Vector4.Normalize(result.Row4);
}