common draw comparisons works now
This commit is contained in:
parent
37367a713e
commit
f03ab319b2
1 changed files with 3 additions and 2 deletions
|
@ -8,7 +8,7 @@ import (
|
||||||
"github.com/hajimehoshi/ebiten/v2"
|
"github.com/hajimehoshi/ebiten/v2"
|
||||||
)
|
)
|
||||||
|
|
||||||
const commonDrawerComparisons = false
|
const commonDrawerComparisons = true
|
||||||
|
|
||||||
var _ Drawer = tombstone{}
|
var _ Drawer = tombstone{}
|
||||||
|
|
||||||
|
@ -111,8 +111,9 @@ func (d *drawList) topsort(π geom.Projector) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the edge goes u->v, add it.
|
// If the edge goes u->v, add it.
|
||||||
if u.DrawBefore(v) || v.DrawAfter(u) {
|
if d.Less(i, j) {
|
||||||
edges[i] = append(edges[i], j)
|
edges[i] = append(edges[i], j)
|
||||||
indegree[j]++
|
indegree[j]++
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue