cleanup repo
This commit is contained in:
@@ -57,7 +57,7 @@ Add regression tests for every gameplay bug fix when practical. If scene-level a
|
||||
- Before beginning with the edit phase, always present a plan first. Only begin editing after the user approves the plan.
|
||||
- Don't make assumptions in the plan. If necessary, ask all clarifying questions before presenting the final plan.
|
||||
- After every iteration, evaluate if the test coverage would fall below 100%, and write tests if necessary.
|
||||
- After every iteration, run `jb cleanupcode --build=False $file1;$file2;...` for every file you touched.
|
||||
- After every iteration, before committing, run `jb cleanupcode --build=False $file1;$file2;...` for every file you touched.
|
||||
- After every iteration, if there's a relevant documentation for the current task, update it according to the change.
|
||||
- Update the wording of touched concerns instead of introducing incremental change reports
|
||||
- The documentation should always represent the current state in its entirety and not derail into a historical development log.
|
||||
|
||||
0
src/SideScrollerGame.Sim/Class1.cs
Normal file
0
src/SideScrollerGame.Sim/Class1.cs
Normal file
File diff suppressed because one or more lines are too long
@@ -182,9 +182,12 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: return m_X;
|
||||
case 1: return m_Y;
|
||||
default: throw new ArgumentOutOfRangeException(nameof(i));
|
||||
case 0:
|
||||
return m_X;
|
||||
case 1:
|
||||
return m_Y;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(i));
|
||||
}
|
||||
}
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
@@ -198,7 +201,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
case 1:
|
||||
m_Y = value;
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException(nameof(i));
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -279,8 +283,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value)).CompareTo(
|
||||
(other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value));
|
||||
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value)).CompareTo((other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -489,6 +492,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
xStart = i;
|
||||
state = EParseState.ParseX;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
case EParseState.ParseX:
|
||||
@@ -533,6 +537,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
{
|
||||
throw new FormatException($"Unexpected character '{character}' after the vector.");
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -570,8 +575,7 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value)).CompareTo(
|
||||
(value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value));
|
||||
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value)).CompareTo((value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1198,7 +1202,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static FixPointVector2 operator *(FixPointVector2 left, FixPoint16 right)
|
||||
{
|
||||
return new() {
|
||||
return new()
|
||||
{
|
||||
m_X = left.m_X * right,
|
||||
m_Y = left.m_Y * right
|
||||
};
|
||||
@@ -1219,7 +1224,8 @@ public struct FixPointVector2 : IEquatable<FixPointVector2>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static FixPointVector2 operator /(FixPointVector2 left, FixPoint16 right)
|
||||
{
|
||||
return new() {
|
||||
return new()
|
||||
{
|
||||
m_X = left.m_X / right,
|
||||
m_Y = left.m_Y / right
|
||||
};
|
||||
|
||||
@@ -127,10 +127,14 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
{
|
||||
switch (i)
|
||||
{
|
||||
case 0: return m_X;
|
||||
case 1: return m_Y;
|
||||
case 2: return m_Z;
|
||||
default: throw new ArgumentOutOfRangeException(nameof(i));
|
||||
case 0:
|
||||
return m_X;
|
||||
case 1:
|
||||
return m_Y;
|
||||
case 2:
|
||||
return m_Z;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(i));
|
||||
}
|
||||
}
|
||||
set
|
||||
@@ -146,7 +150,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
case 2:
|
||||
m_Z = value;
|
||||
break;
|
||||
default: throw new ArgumentOutOfRangeException(nameof(i));
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException(nameof(i));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -227,8 +232,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value) + (m_Z.m_Value * (long)m_Z.m_Value)).CompareTo(
|
||||
(other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value) + (other.m_Z.m_Value * (long)other.m_Z.m_Value));
|
||||
return ((m_X.m_Value * (long)m_X.m_Value) + (m_Y.m_Value * (long)m_Y.m_Value) + (m_Z.m_Value * (long)m_Z.m_Value)).CompareTo((other.m_X.m_Value * (long)other.m_X.m_Value) + (other.m_Y.m_Value * (long)other.m_Y.m_Value) + (other.m_Z.m_Value * (long)other.m_Z.m_Value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -430,8 +434,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
var yz2 = rotation.m_Y * z2;
|
||||
var zz2 = rotation.m_Z * z2;
|
||||
|
||||
return new((value.m_X * (1 - yy2 - zz2)) + (value.m_Y * (xy2 - wz2)) + (value.m_Z * (xz2 + wy2)), (value.m_X * (xy2 + wz2)) + (value.m_Y * (1 - xx2 - zz2)) + (value.m_Z * (yz2 - wx2)),
|
||||
(value.m_X * (xz2 - wy2)) + (value.m_Y * (yz2 + wx2)) + (value.m_Z * (1 - xx2 - yy2)));
|
||||
return new((value.m_X * (1 - yy2 - zz2)) + (value.m_Y * (xy2 - wz2)) + (value.m_Z * (xz2 + wy2)), (value.m_X * (xy2 + wz2)) + (value.m_Y * (1 - xx2 - zz2)) + (value.m_Z * (yz2 - wx2)), (value.m_X * (xz2 - wy2)) + (value.m_Y * (yz2 + wx2)) + (value.m_Z * (1 - xx2 - yy2)));
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -453,8 +456,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((value.m_X.m_Value * (long)value.m_X.m_Value) + (value.m_Y.m_Value * (long)value.m_Y.m_Value) + (value.m_Z.m_Value * (long)value.m_Z.m_Value)).CompareTo(
|
||||
fLength.m_Value * (long)fLength.m_Value);
|
||||
return ((value.m_X.m_Value * (long)value.m_X.m_Value) + (value.m_Y.m_Value * (long)value.m_Y.m_Value) + (value.m_Z.m_Value * (long)value.m_Z.m_Value)).CompareTo(fLength.m_Value * (long)fLength.m_Value);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -463,8 +465,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value) + (value1.m_Z.m_Value * (long)value1.m_Z.m_Value)).CompareTo(
|
||||
(value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value) + (value2.m_Z.m_Value * (long)value2.m_Z.m_Value));
|
||||
return ((value1.m_X.m_Value * (long)value1.m_X.m_Value) + (value1.m_Y.m_Value * (long)value1.m_Y.m_Value) + (value1.m_Z.m_Value * (long)value1.m_Z.m_Value)).CompareTo((value2.m_X.m_Value * (long)value2.m_X.m_Value) + (value2.m_Y.m_Value * (long)value2.m_Y.m_Value) + (value2.m_Z.m_Value * (long)value2.m_Z.m_Value));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -477,8 +478,7 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static SFixPointVector3 Cross(SFixPointVector3 vector1, SFixPointVector3 vector2)
|
||||
{
|
||||
return new((vector1.m_Y * vector2.m_Z) - (vector1.m_Z * vector2.m_Y), (vector1.m_Z * vector2.m_X) - (vector1.m_X * vector2.m_Z),
|
||||
(vector1.m_X * vector2.m_Y) - (vector1.m_Y * vector2.m_X));
|
||||
return new((vector1.m_Y * vector2.m_Z) - (vector1.m_Z * vector2.m_Y), (vector1.m_Z * vector2.m_X) - (vector1.m_X * vector2.m_Z), (vector1.m_X * vector2.m_Y) - (vector1.m_Y * vector2.m_X));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -939,7 +939,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static SFixPointVector3 operator *(SFixPointVector3 left, FixPoint16 right)
|
||||
{
|
||||
return new() {
|
||||
return new()
|
||||
{
|
||||
m_X = left.m_X * right,
|
||||
m_Y = left.m_Y * right,
|
||||
m_Z = left.m_Z * right
|
||||
@@ -961,7 +962,8 @@ public struct SFixPointVector3 : IEquatable<SFixPointVector3>
|
||||
[MethodImpl(MethodImplOptions.AggressiveInlining)]
|
||||
public static SFixPointVector3 operator /(SFixPointVector3 left, FixPoint16 right)
|
||||
{
|
||||
return new() {
|
||||
return new()
|
||||
{
|
||||
m_X = left.m_X / right,
|
||||
m_Y = left.m_Y / right,
|
||||
m_Z = left.m_Z / right
|
||||
|
||||
0
tests/SideScrollerGame.Sim.Tests/UnitTest1.cs
Normal file
0
tests/SideScrollerGame.Sim.Tests/UnitTest1.cs
Normal file
Reference in New Issue
Block a user