Skip to content

Commit

Permalink
Inline Envelope::covers
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaston committed Sep 9, 2022
1 parent 1804c2a commit 5c7b590
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
7 changes: 6 additions & 1 deletion include/geos/geom/Envelope.h
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,12 @@ class GEOS_DLL Envelope {
* @param y the y-coordinate of the point which this Envelope is being checked for containing
* @return `true` if `(x, y)` lies in the interior or on the boundary of this Envelope.
*/
bool covers(double x, double y) const;
bool covers(double x, double y) const {
return x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy;
}

/** \brief
* Tests if the given point lies in or on the envelope.
Expand Down
12 changes: 0 additions & 12 deletions src/geom/Envelope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,6 @@ Envelope::Envelope(const std::string& str)
strtod(values[3].c_str(), nullptr));
}


/*public*/
bool
Envelope::covers(double x, double y) const
{
return x >= minx &&
x <= maxx &&
y >= miny &&
y <= maxy;
}


/*public*/
bool
Envelope::covers(const Envelope& other) const
Expand Down

0 comments on commit 5c7b590

Please sign in to comment.