Skip to main content

sort_dots

Function sort_dots 

Source
pub fn sort_dots(dots: &mut [Dot])
Expand description

Z-sort far→near so nearer dots paint over farther ones.

sort_unstable_by is used deliberately: it sorts in place (the stable sort allocates a scratch buffer every call) and ties only happen between dots at identical depth, where paint order is visually irrelevant.