mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -43,10 +43,9 @@ bool IsPointOnSegment(PointD const & pt, PointD const & p1, PointD const & p2)
|
||||
bool SegmentsIntersect(PointD const & a, PointD const & b, PointD const & c, PointD const & d)
|
||||
{
|
||||
using std::max, std::min;
|
||||
return max(a.x, b.x) >= min(c.x, d.x) && min(a.x, b.x) <= max(c.x, d.x) &&
|
||||
max(a.y, b.y) >= min(c.y, d.y) && min(a.y, b.y) <= max(c.y, d.y) &&
|
||||
robust::OrientedS(a, b, c) * robust::OrientedS(a, b, d) <= 0.0 &&
|
||||
robust::OrientedS(c, d, a) * robust::OrientedS(c, d, b) <= 0.0;
|
||||
return max(a.x, b.x) >= min(c.x, d.x) && min(a.x, b.x) <= max(c.x, d.x) && max(a.y, b.y) >= min(c.y, d.y) &&
|
||||
min(a.y, b.y) <= max(c.y, d.y) && robust::OrientedS(a, b, c) * robust::OrientedS(a, b, d) <= 0.0 &&
|
||||
robust::OrientedS(c, d, a) * robust::OrientedS(c, d, b) <= 0.0;
|
||||
}
|
||||
|
||||
IntersectionResult Intersect(Segment2D const & seg1, Segment2D const & seg2, double eps)
|
||||
|
||||
Reference in New Issue
Block a user