some minor cleanups
continuous-integration/drone/push Build is passing Details

3D
Evan Hemsley 2020-07-18 13:19:36 -07:00
parent b152755481
commit e6bab0de5e
5 changed files with 10 additions and 5 deletions

View File

@ -26,11 +26,13 @@ namespace MoonTools.Bonk
public float Right { get { return Max.X; } }
public float Left { get { return Min.X; } }
/// <summary>
/// The top of the AABB. Assumes a downward-aligned Y axis, so this value will be smaller than Bottom.
/// </summary>
/// <value></value>
public float Top { get { return Min.Y; } }
/// <summary>
/// The bottom of the AABB. Assumes a downward-aligned Y axis, so this value will be larger than Top.
/// </summary>

View File

@ -60,7 +60,7 @@ namespace MoonTools.Bonk
}
/// <summary>
/// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape.
/// </summary>
/// <param name="multiShape"></param>
@ -78,7 +78,7 @@ namespace MoonTools.Bonk
}
/// <summary>
/// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Tests if a multishape-transform and shape-transform pair are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishape.
/// </summary>
/// <param name="multiShape"></param>
@ -96,7 +96,7 @@ namespace MoonTools.Bonk
}
/// <summary>
/// Tests if two multishape-transform pairs are overlapping.
/// Tests if two multishape-transform pairs are overlapping.
/// Note that this must perform pairwise comparison so the worst-case performance of this method will vary inversely with the amount of shapes in the multishapes.
/// </summary>
/// <param name="multiShapeA"></param>

View File

@ -4,6 +4,9 @@ using MoonTools.Structs;
namespace MoonTools.Bonk
{
/// <summary>
/// A Point is "that which has not part". All points by themselves are identical.
/// </summary>
public struct Point : IShape2D, IEquatable<Point>
{
public AABB AABB { get; }

View File

@ -59,7 +59,7 @@ namespace MoonTools.Bonk
public bool Equals(IShape2D other)
{
return (other is Polygon otherPolygon && Equals(otherPolygon));
return other is Polygon otherPolygon && Equals(otherPolygon);
}
public bool Equals(Polygon other)

View File

@ -5,7 +5,7 @@ namespace MoonTools.Bonk
{
public struct SweepResult<T> where T : IEquatable<T>
{
public static SweepResult<T> False = new SweepResult<T>();
public readonly static SweepResult<T> False = new SweepResult<T>();
public bool Hit { get; }
public Vector2 Motion { get; }