MCPcopy Create free account
hub / github.com/algorithm-archivists/algorithm-archive / polarAngle

Function polarAngle

contents/graham_scan/code/go/graham.go:17–19  ·  view source on GitHub ↗
(ref, point point)

Source from the content-addressed store, hash-verified

15}
16
17func polarAngle(ref, point point) float64 {
18 return math.Atan2(float64(point.y-ref.y), float64(point.x-ref.x))
19}
20
21func grahamScan(points []point) []point {
22 sort.Slice(points, func(a, b int) bool {

Callers 1

grahamScanFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected