         return Utils.lli8(x1,y1,x2,y2,x3,y3,x4,y4)
     }
     
-//    static func lli(_ v1: BKFloat,_ v2: BKFloat) -> BKPoint? {
-//        return Utils.lli4(v1,v1.c,v2,v2.c)
-//    }
-
+    //    static func lli(_ v1: BKFloat,_ v2: BKFloat) -> BKPoint? {
+    //        return Utils.lli4(v1,v1.c,v2,v2.c)
+    //    }
+    
     static func getminmax(list: [BKFloat], computeDimension: (BKFloat) -> BKFloat) -> (min: BKFloat, max: BKFloat) {
         var min = BKFloat.infinity
         var max = -BKFloat.infinity

        for pair in pairs {
            results += Utils.pairiteration(pair.left, pair.right, threshold)
        }
// TODO: remove duplicates
        //        results = results.filter({(v,i) in
//            return results.index(of: v) == i
//        })
        return results
    }

    struct ShapeIntersection {
        var c1: BezierCurve
        var c2: BezierCurve
//        var s1: Shape
//        var s2: Shape
        var intersection: [Intersection]
    }
    

            if t2 >= 1.0 || t2 <= 0.0 {
                return [] // t2 out of interval [0, 1]
            }
            // segments intersect at t1, t2
            return [Intersection(t1: t1 * c1._t2 + (1.0 - t1) * c1._t1,
                                 t2: t2 * c2._t2 + (1.0 - t2) * c2._t1)]
            
        }
        
        let cc1 = c1.split(0.5) as! MultipleCurves
        let cc2 = c2.split(0.5) as! MultipleCurves
        
        var pairs = [
            (left: cc1.left, right: cc2.left ),
            (left: cc1.left, right: cc2.right ),
            (left: cc1.right, right: cc2.right ),
            (left: cc1.right, right: cc2.left )]
        pairs = pairs.filter( {(pair) in
            return pair.left.curve.boundingBox.overlaps(pair.right.curve.boundingBox)
        })
