diff options
| author | 2015-05-22 19:40:57 -0400 | |
|---|---|---|
| committer | 2015-05-22 19:40:57 -0400 | |
| commit | 7b94b312d39037e9a90c981b49743965c0d1a743 (patch) | |
| tree | f922946de22f54bf0c0aaaff01371f5ca7a2fc57 /src/common | |
| parent | Merge pull request #798 from yuriks/y2r-bw (diff) | |
| parent | Flush for y2r (moflex) (diff) | |
| download | yuzu-7b94b312d39037e9a90c981b49743965c0d1a743.tar.gz yuzu-7b94b312d39037e9a90c981b49743965c0d1a743.tar.xz yuzu-7b94b312d39037e9a90c981b49743965c0d1a743.zip | |
Merge pull request #789 from tfarley/opengl-renderer
OpenGL Hardware Renderer
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/math_util.h | 4 |
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 @@ | |||
| 11 | namespace MathUtil | 11 | namespace MathUtil |
| 12 | { | 12 | { |
| 13 | 13 | ||
| 14 | inline bool IntervalsIntersect(unsigned start0, unsigned length0, unsigned start1, unsigned length1) { | ||
| 15 | return (std::max(start0, start1) <= std::min(start0 + length0, start1 + length1)); | ||
| 16 | } | ||
| 17 | |||
| 14 | template<typename T> | 18 | template<typename T> |
| 15 | inline T Clamp(const T val, const T& min, const T& max) | 19 | inline T Clamp(const T val, const T& min, const T& max) |
| 16 | { | 20 | { |