private static function getIntersections($edges, $y) 
    {
        $intersections = array();

        foreach ($edges as $edge) {
            if ($edge->y0 < $y && $edge->y1 >= $y ||
                $edge->y0 >= $y && $edge->y1 < $y
            ) {
                $x = $edge->x0 +
                    ($edge->x1 - $edge->x0) * ($y - $edge->y0) /
                    ($edge->y1 - $edge->y0);

                $intersections[] = new EdgeSuperSampleIntersection($x, $edge);
            }
        }

        usort($intersections, array(
            'Jdenticon\\Canvas\\Rasterization\\Rasterizer', 
            'intersection_cmp'));
        
        return $intersections;
    }