Skip to content

Commit

Permalink
More fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
abellgithub committed May 1, 2018
1 parent 90bc2cc commit 95b62a1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
10 changes: 5 additions & 5 deletions plugins/greyhound/io/bounds.cpp
Expand Up @@ -111,8 +111,8 @@ Json::Value Bounds::toJson() const

void Bounds::grow(const Bounds& other)
{
grow(other.min());
grow(other.max());
grow(other.minimum());
grow(other.maximum());
}

void Bounds::grow(const Point& p)
Expand All @@ -128,8 +128,8 @@ void Bounds::grow(const Point& p)

void Bounds::shrink(const Bounds& other)
{
m_min = (Point::max)(m_min, other.min());
m_max = (Point::min)(m_max, other.max());
m_min = Point::maximum(m_min, other.minimum());
m_max = Point::minimum(m_max, other.maximum());
setMid();
}

Expand All @@ -150,7 +150,7 @@ std::ostream& operator<<(std::ostream& os, const Bounds& bounds)

os << std::setprecision(2) << std::fixed;

os << "[" << bounds.min() << ", " << bounds.max() << "]";
os << "[" << bounds.minimum() << ", " << bounds.maximum() << "]";

os << std::setprecision(precision);
os.flags(flags);
Expand Down
6 changes: 4 additions & 2 deletions plugins/greyhound/io/bounds.hpp
Expand Up @@ -64,8 +64,10 @@ class PDAL_DLL Bounds
return
width() > 0 && depth() > 0 &&
other.width() > 0 && other.depth() > 0 &&
max().x > other.minimum().x && minimum().x < other.maximum().x &&
max().y > other.minimum().y && minimum().y < other.maximum().y &&
maximum().x > other.minimum().x &&
minimum().x < other.maximum().x &&
maximum().y > other.minimum().y &&
minimum().y < other.maximum().y &&
(force2d || (
(!height() && !other.height()) || (
height() > 0 && other.height() > 0 &&
Expand Down
2 changes: 1 addition & 1 deletion plugins/greyhound/io/point.hpp
Expand Up @@ -385,7 +385,7 @@ inline std::ostream& operator<<(std::ostream& os, const Point& point)

auto printCoord([&os](double d)
{
if (d == (std::numeric_limits<double>::ma)x()) os << "max";
if (d == (std::numeric_limits<double>::max)()) os << "max";
else if (d == std::numeric_limits<double>::lowest()) os << "min";
else if (std::trunc(d) == d) os << static_cast<long>(d);
else
Expand Down

0 comments on commit 95b62a1

Please sign in to comment.