summaryrefslogtreecommitdiff
path: root/src/ui/util.h
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2020-09-12 23:14:19 +0300
committerJaakko Keränen <jaakko.keranen@iki.fi>2020-09-12 23:14:19 +0300
commitba8e8eb4219c3ad3b9b87c0a6800ef2d26b6c964 (patch)
tree9ce0d372c2336c8158cbb9f448b9c9208b19c639 /src/ui/util.h
parent6f02d2520ff9dc8d98ce0c8d2f554407c2f479fe (diff)
Added range helper
Diffstat (limited to 'src/ui/util.h')
-rw-r--r--src/ui/util.h3
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) {
59iLocalDef iBool isEmpty_Rangei(iRangei d) { 59iLocalDef iBool isEmpty_Rangei(iRangei d) {
60 return size_Range(&d) == 0; 60 return size_Range(&d) == 0;
61} 61}
62iLocalDef iBool isOverlapping_Rangei(iRangei a, iRangei b) {
63 return !isEmpty_Rangei(intersect_Rangei(a, b));
64}
62 65
63/*-----------------------------------------------------------------------------------------------*/ 66/*-----------------------------------------------------------------------------------------------*/
64 67