MCPcopy Create free account
hub / github.com/SuprDewd/CompetitiveProgramming / cmp

Function cmp

code/geometry/convex_hull.cpp:4–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#define MAXN 1000
3point hull[MAXN];
4bool cmp(const point &a, const point &b) {
5 return abs(real(a) - real(b)) > EPS ?
6 real(a) < real(b) : imag(a) < imag(b); }
7int convex_hull(polygon p) {
8 int n = size(p), l = 0;
9 sort(p.begin(), p.end(), cmp);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected