diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-12 23:14:19 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2020-09-12 23:14:19 +0300 |
commit | ba8e8eb4219c3ad3b9b87c0a6800ef2d26b6c964 (patch) | |
tree | 9ce0d372c2336c8158cbb9f448b9c9208b19c639 /src/ui/util.h | |
parent | 6f02d2520ff9dc8d98ce0c8d2f554407c2f479fe (diff) |
Added range helper
Diffstat (limited to 'src/ui/util.h')
-rw-r--r-- | src/ui/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/util.h b/src/ui/util.h index 468f2057..8ca9dd53 100644 --- a/src/ui/util.h +++ b/src/ui/util.h | |||
@@ -59,6 +59,9 @@ iLocalDef iBool equal_Rangei(iRangei a, iRangei b) { | |||
59 | iLocalDef iBool isEmpty_Rangei(iRangei d) { | 59 | iLocalDef iBool isEmpty_Rangei(iRangei d) { |
60 | return size_Range(&d) == 0; | 60 | return size_Range(&d) == 0; |
61 | } | 61 | } |
62 | iLocalDef iBool isOverlapping_Rangei(iRangei a, iRangei b) { | ||
63 | return !isEmpty_Rangei(intersect_Rangei(a, b)); | ||
64 | } | ||
62 | 65 | ||
63 | /*-----------------------------------------------------------------------------------------------*/ | 66 | /*-----------------------------------------------------------------------------------------------*/ |
64 | 67 | ||