MCPcopy
hub / github.com/tdewolff/canvas / up

Method up

path_intersection.go:473–482  ·  view source on GitHub ↗

func (q *SweepEvents) Fix(i int) { if !q.down(i, len(*q)) { q.up(i) } } from container/heap

(j int)

Source from the content-addressed store, hash-verified

471
472// from container/heap
473func (q SweepEvents) up(j int) {
474 for {
475 i := (j - 1) / 2 // parent
476 if i == j || !q.Less(j, i) {
477 break
478 }
479 q.Swap(i, j)
480 j = i
481 }
482}
483
484func (q SweepEvents) down(i0, n int) bool {
485 i := i0

Callers 1

PushMethod · 0.95

Calls 2

LessMethod · 0.95
SwapMethod · 0.95

Tested by

no test coverage detected