@@ -105,21 +105,18 @@ _left_intersect_type(::Type{Val{:closed}}, ::Type{Val{L2}}, a1, a2) where L2 = a
105
105
_right_intersect_type (:: Type{Val{:open}} , :: Type{Val{R2}} , b1, b2) where R2 = b1 > b2 ? (b2,R2) : (b1,:open )
106
106
_right_intersect_type (:: Type{Val{:closed}} , :: Type{Val{R2}} , b1, b2) where R2 = b1 ≥ b2 ? (b2,R2) : (b1,:closed )
107
107
108
- function intersect (d1:: TypedEndpointsInterval{L1,R1,T } , d2:: TypedEndpointsInterval{L2,R2,T } ) where {L1,R1,L2,R2,T }
108
+ function intersect (d1:: TypedEndpointsInterval{L1,R1} , d2:: TypedEndpointsInterval{L2,R2} ) where {L1,R1,L2,R2}
109
109
a1, b1 = endpoints (d1); a2, b2 = endpoints (d2)
110
110
a,L = _left_intersect_type (Val{L1}, Val{L2}, a1, a2)
111
111
b,R = _right_intersect_type (Val{R1}, Val{R2}, b1, b2)
112
112
Interval {L,R} (a,b)
113
113
end
114
114
115
- function intersect (d1:: TypedEndpointsInterval{L,R,T } , d2:: TypedEndpointsInterval{L,R,T } ) where {L,R,T }
115
+ function intersect (d1:: TypedEndpointsInterval{L,R} , d2:: TypedEndpointsInterval{L,R} ) where {L,R}
116
116
a1, b1 = endpoints (d1); a2, b2 = endpoints (d2)
117
117
Interval {L,R} (max (a1,a2),min (b1,b2))
118
118
end
119
119
120
- intersect (d1:: TypedEndpointsInterval{L1,R1,T} , d2:: TypedEndpointsInterval{L2,R2,V} ) where {L1,R1,L2,R2,T,V} =
121
- intersect (promote (d1, d2)... )
122
-
123
120
intersect (d1:: AbstractInterval , d2:: AbstractInterval ) = intersect (Interval (d1), Interval (d2))
124
121
125
122
0 commit comments