             switch other.segment {
             case let .line(q1):
                 if let p = LineSegment(start, p1).intersect(LineSegment(other.start, q1)) {
-                    result = _filter(_closest(p), other._closest(p)).map { [($0, $1)] } ?? []
+                    result = _filter(__closest(p), other.__closest(p)).map { [($0, $1)] } ?? []
                 }
             case let .quad(q1, q2):
                 if let t = QuadBezier(other.start, q1, q2).intersect(LineSegment(start, p1), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(_closest(QuadBezier(other.start, q1, q2).eval($0)), split_check($0)) }
+                    result = t.compactMap { _filter(__closest(QuadBezier(other.start, q1, q2).eval($0)), split_check($0)) }
                 }
             case let .cubic(q1, q2, q3):
                 if let t = CubicBezier(other.start, q1, q2, q3).intersect(LineSegment(start, p1), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(_closest(CubicBezier(other.start, q1, q2, q3).eval($0)), split_check($0)) }
+                    result = t.compactMap { _filter(__closest(CubicBezier(other.start, q1, q2, q3).eval($0)), split_check($0)) }
                 }
             }
         case let .quad(p1, p2):
             switch other.segment {
             case let .line(q1):
                 if let t = QuadBezier(start, p1, p2).intersect(LineSegment(other.start, q1), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(split_check($0), other._closest(QuadBezier(start, p1, p2).eval($0))) }
+                    result = t.compactMap { _filter(split_check($0), other.__closest(QuadBezier(start, p1, p2).eval($0))) }
                 }
             case let .quad(q1, q2):
                 if let t = QuadBezier(start, p1, p2).intersect(QuadBezier(other.start, q1, q2), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(split_check($0), other._closest(QuadBezier(start, p1, p2).eval($0))) }
+                    result = t.compactMap { _filter(split_check($0), other.__closest(QuadBezier(start, p1, p2).eval($0))) }
                 }
             case let .cubic(q1, q2, q3):
                 if let t = CubicBezier(other.start, q1, q2, q3).intersect(QuadBezier(start, p1, p2), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(_closest(CubicBezier(other.start, q1, q2, q3).eval($0)), split_check($0)) }
+                    result = t.compactMap { _filter(__closest(CubicBezier(other.start, q1, q2, q3).eval($0)), split_check($0)) }
                 }
             }
         case let .cubic(p1, p2, p3):
             switch other.segment {
             case let .line(q1):
                 if let t = CubicBezier(start, p1, p2, p3).intersect(LineSegment(other.start, q1), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(split_check($0), other._closest(CubicBezier(start, p1, p2, p3).eval($0))) }
+                    result = t.compactMap { _filter(split_check($0), other.__closest(CubicBezier(start, p1, p2, p3).eval($0))) }
                 }
             case let .quad(q1, q2):
                 if let t = CubicBezier(start, p1, p2, p3).intersect(QuadBezier(other.start, q1, q2), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(split_check($0), other._closest(CubicBezier(start, p1, p2, p3).eval($0))) }
+                    result = t.compactMap { _filter(split_check($0), other.__closest(CubicBezier(start, p1, p2, p3).eval($0))) }
                 }
             case let .cubic(q1, q2, q3):
                 if let t = CubicBezier(start, p1, p2, p3).intersect(CubicBezier(other.start, q1, q2, q3), in: -0.5...1.5) {
-                    result = t.compactMap { _filter(split_check($0), other._closest(CubicBezier(start, p1, p2, p3).eval($0))) }
+                    result = t.compactMap { _filter(split_check($0), other.__closest(CubicBezier(start, p1, p2, p3).eval($0))) }
                 }
             }
         }

    @inlinable
    public func closest(_ p: Point) -> Double {
        let _min = p.distance(to: self.start) < p.distance(to: self.end) ? 0.0 : 1.0
        return self._closest(p) ?? _min
    }
    
    @inlinable

    
    @inlinable
    func __closest(_ p: Point) -> Double? {
        let list: [Double]
        switch self.segment {
        case let .line(p1): list = LineSegment(start, p1).closest(p, in: -0.5...1.5)
        case let .quad(p1, p2): list = QuadBezier(start, p1, p2).closest(p, in: -0.5...1.5)
        case let .cubic(p1, p2, p3): list = CubicBezier(start, p1, p2, p3).closest(p, in: -0.5...1.5)
        }
        let result = list.first { p.almostEqual(self.point($0)) } ?? list.first
        return result.flatMap(split_check)
    }
    
    @inlinable
