common draw comparisons works now

This commit is contained in:
Josh Deprez 2021-09-17 14:39:23 +10:00
parent 37367a713e
commit f03ab319b2

View file

@ -8,7 +8,7 @@ import (
"github.com/hajimehoshi/ebiten/v2"
)
const commonDrawerComparisons = false
const commonDrawerComparisons = true
var _ Drawer = tombstone{}
@ -111,8 +111,9 @@ func (d *drawList) topsort(π geom.Projector) {
continue
}
}
// 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)
indegree[j]++
}