-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
display and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliarangesEverything AbstractRangeEverything AbstractRange
Description
If you call intersect
between two ranges and the result is empty it returns an empty range of the form 5:4
as in like
julia> a = 1:3
1:3
julia> b = 5:6
5:6
julia> intersect(a,b)
5:4
That can be confusing since you might interpret 5:4
as 5:-1:4
Using Float ranges gives a different result though
julia> a = 30:0.5:42
30.0:0.5:42.0
julia> b = 15:0.5:25
15.0:0.5:25.0
julia> intersect(a,b)
Float64[]
ederag, karldw and nathanrboyer
Metadata
Metadata
Assignees
Labels
display and printingAesthetics and correctness of printed representations of objects.Aesthetics and correctness of printed representations of objects.good first issueIndicates a good issue for first-time contributors to JuliaIndicates a good issue for first-time contributors to JuliarangesEverything AbstractRangeEverything AbstractRange