faster
This commit is contained in:
parent
9ccbcf7347
commit
3e4b66b093
|
@ -1180,7 +1180,7 @@ proc computeCoverages(
|
||||||
winding = partitioning.partitions[partitionIndex][i][1]
|
winding = partitioning.partitions[partitionIndex][i][1]
|
||||||
if segment.at.y <= scanline.a.y and segment.to.y >= scanline.a.y:
|
if segment.at.y <= scanline.a.y and segment.to.y >= scanline.a.y:
|
||||||
var at: Vec2
|
var at: Vec2
|
||||||
if scanline.intersects(segment, at) and segment.to != at:
|
if segment.to != at and scanline.intersects(segment, at):
|
||||||
if numHits == hits.len:
|
if numHits == hits.len:
|
||||||
hits.setLen(hits.len * 2)
|
hits.setLen(hits.len * 2)
|
||||||
hits[numHits] = (min(at.x, size.x), winding)
|
hits[numHits] = (min(at.x, size.x), winding)
|
||||||
|
|
Loading…
Reference in a new issue