Eryan.Input.PreciseMouse.atPosition C# (CSharp) Method

atPosition() public method

Check whether the mouse it at the given x and y coordinates
public atPosition ( int x, int y ) : bool
x int X coordinate to check
y int Y coordinate to check
return bool
        public new bool atPosition(int x, int y)
        {
            if (cursorLocation().X >= x - 2 && cursorLocation().X <= x + 2)
                if (cursorLocation().Y >= y - 2 && cursorLocation().Y <= y + 2)
                    return true;
            return false;
        }