PassiveSupport.Range.overlaps-question-mark
You're seeing just the function
overlaps-question-mark
, go back to PassiveSupport.Range module for more information.
Specs
Returns true
if either end of either range falls within the other.
Returns false
if the second argument is not a range, or if the
ranges have opposing polarities.
Examples
iex> overlaps?(1..5, 4..6)
true
iex> overlaps?(4..6, 1..5)
true
iex> overlaps?(1..5, 6..7)
false
iex> overlaps?(1..5, 2..4)
true
iex> overlaps?(2..4, 1..5)
true
iex> overlaps?(5..1, 4..6)
false
iex> overlaps?(4..6, 5..1)
false
iex> overlaps?(1..5, 6..4)
false
iex> overlaps?(6..4, 1..5)
false
iex> overlaps?(6..4, 5..1)
true