summaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authortfarley <tfarleygithub@gmail.com>2015-05-19 06:21:33 +0200
committertfarley <tfarleygithub@gmail.com>2015-05-23 00:51:18 +0200
commit05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2 (patch)
treed080c1efd3b928bda551cb9eee304547e66a4351 /src/common
parentINI hw/sw renderer toggle (diff)
downloadyuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.gz
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.bz2
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.lz
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.xz
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.tar.zst
yuzu-05dc633a8c35221ce8d6abe6ddf027f8b0bab6c2.zip
Diffstat (limited to '')
-rw-r--r--src/common/math_util.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/math_util.h b/src/common/math_util.h
index 0b1400b41..4b0910741 100644
--- a/src/common/math_util.h
+++ b/src/common/math_util.h
@@ -11,6 +11,10 @@
namespace MathUtil
{
+inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start1, unsigned length1) {
+ return (std::max(start0, start1) <= std::min(start0 + length0, start1 + length1));
+}
+
template<typename T>
inline T Clamp(const T val, const T& min, const T& max)
{