1
0
mirror of synced 2024-12-03 19:47:29 +01:00
Switch-Toolbox/Switch_Toolbox_Library/IO/Extensions/Rectangle.cs

20 lines
454 B
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;
namespace Toolbox.Library.IO
{
public static class RectangleExtension
{
public static bool IsHit(this Rectangle hitbox, Point e)
{
return (e.X > hitbox.X) && (e.X < hitbox.X + hitbox.Width) &&
(e.Y > hitbox.Y) && (e.Y < hitbox.Y + hitbox.Height);
}
}
}