MCPcopy Create free account
hub / github.com/ShahjalalShohag/code-library / dot

Method dot

Dynamic Programming Optimizations/Persistent CHT.cpp:4–6  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2 int x, y;
3 PT(int x = 0, int y = 0): x(x), y(y) {}
4 friend ll dot(PT &a, PT &b) {
5 return 1ll * a.x * b.x + 1ll * a.y * b.y;
6 }
7 friend int orientation(PT &a, PT &b, PT &c) {
8 ll s = 1ll * (b.x - a.x) * (c.y - a.y) - 1ll * (b.y - a.y) * (c.x - a.x);
9 return (s > 0) - (s < 0);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected