mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Define a test of endpoint overlap.
This commit is contained in:
parent
4ad49d4f82
commit
0624d24aa7
@ -49,6 +49,9 @@ at v (Diagonal k) = do
|
|||||||
Diagonal o <- gets offset
|
Diagonal o <- gets offset
|
||||||
return (Endpoint (v Vector.! o + k, 0))
|
return (Endpoint (v Vector.! o + k, 0))
|
||||||
|
|
||||||
|
overlaps :: Endpoint -> Endpoint -> Bool
|
||||||
|
overlaps (Endpoint (x, y)) (Endpoint (u, v)) = x - y == u - v && x <= u
|
||||||
|
|
||||||
|
|
||||||
-- Instances
|
-- Instances
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user