5 lower_left_(lower_left), upper_right_(upper_right)
7 assert(upper_right.
x>lower_left.
x &&
8 upper_right.
y>lower_left.
y &&
9 "vertices are reversed");
13 lower_left_(ll_ur.first), upper_right_(ll_ur.second)
15 assert(upper_right_.
x>lower_left_.
x &&
16 upper_right_.
y>lower_left_.
y &&
17 "vertices are reversed");
22 bool is_between(
double x_cand,
26 return (x_high>x_cand)&&(x_cand>x_low);
32 return is_between(point.
x,lower_left_.
x,upper_right_.
x)&&
33 is_between(point.
y,lower_left_.
y,upper_right_.
y);
RightRectangle(const Vector2D &lower_left, const Vector2D &upper_right)
Class constructor.
double y
Component in the y direction.
Defines a rectangular shape.
bool operator()(const Vector2D &point) const
Returns true is a point is inside the shape, false otherwise.
double x
Component in the x direction.