I want to check whether a point $(x,y)$ belongs to a square region whose x-interval is $[x_1,x_2]$ and y-interval is $[y_1,y_2]$. I defined the 2d region as
Interval[{{x1,x2},{y1,y2}}]
and checked for membership as
IntervalMemberQ[Interval[{{x1,x2},{y1,y2}}],{x,y}]
but the output is always {False, False} no matter the input. For example
IntervalMemberQ[Interval[{{0,1},{0,1}}],{0.5,0.5}]
{False,False} (*output*)
What is going wrong? What is the correct way to deal with this problem? Thanks in advance for any help.
Intervalis strictly 1D. DoRegionMember[ImplicitRegion[0 <= x <= 1 && 0 <= y <= 1, {x, y}], {0.5, 0.5}]. – corey979 Nov 17 '16 at 11:03