MoonTools.Bonk/Bonk/SweepTest/SweepResult.cs

22 lines
470 B
C#
Raw Normal View History

2020-01-05 07:17:29 +00:00
using System;
using System.Numerics;
2020-02-21 08:03:47 +00:00
namespace MoonTools.Bonk
2020-01-05 07:17:29 +00:00
{
public struct SweepResult<T> where T : IEquatable<T>
2020-01-05 07:17:29 +00:00
{
2020-07-18 20:19:36 +00:00
public readonly static SweepResult<T> False = new SweepResult<T>();
2020-01-05 07:17:29 +00:00
public bool Hit { get; }
public Vector2 Motion { get; }
public T ID { get; }
public SweepResult(bool hit, Vector2 motion, T id)
2020-01-05 07:17:29 +00:00
{
Hit = hit;
Motion = motion;
ID = id;
}
}
}