- replaced MIN/MAX in all non-common code.

This commit is contained in:
Christoph Oelckers 2021-10-30 10:16:52 +02:00
commit 1d0aed219e
43 changed files with 147 additions and 146 deletions

View file

@ -72,8 +72,8 @@ struct BoundingRect
double distanceTo(const BoundingRect &other) const
{
if (intersects(other)) return 0;
return std::max(std::min(fabs(left - other.right), fabs(right - other.left)),
std::min(fabs(top - other.bottom), fabs(bottom - other.top)));
return max(min(fabs(left - other.right), fabs(right - other.left)),
min(fabs(top - other.bottom), fabs(bottom - other.top)));
}
void addVertex(double x, double y)