feat: NotNullWhen to TryDetect

This commit is contained in:
2024-01-25 18:32:13 +03:00
parent f7467a62ee
commit f5be49609b
2 changed files with 12 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
using System.Diagnostics.CodeAnalysis;
using Syntriax.Engine.Physics2D.Abstract;
namespace Syntriax.Engine.Physics2D;
public interface ICollisionDetector
{
bool TryDetect<T1, T2>(T1 left, T2 right, out CollisionDetectionInformation? collisionInformation) where T1 : ICollider2D where T2 : ICollider2D;
bool TryDetect<T1, T2>(T1 left, T2 right, [NotNullWhen(returnValue: true)] out CollisionDetectionInformation? collisionInformation) where T1 : ICollider2D where T2 : ICollider2D;
}