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

Function cmpsl

code/geometry/convex_hull3d.cpp:8–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6 return a.z < b.z; }
7point3d slp;
8bool cmpsl(const point3d& a, const point3d& b) {
9 point3d ad = a-slp, bd = b-slp;
10 return atan2(ad.y, sqrt(ad.x*ad.x + ad.z*ad.z)) <
11 atan2(bd.y, sqrt(bd.x*bd.x + bd.z*bd.z)); }
12set<vi> gift_wrap(vector<point3d> points) {
13 int n = points.size(), lowi = 0, lowj = 0;
14 set<vi> res; set<ii> vis; queue<ii> q;

Callers 1

gift_wrapFunction · 0.85

Calls 1

sqrtFunction · 0.85

Tested by

no test coverage detected