diff options
author | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:42 -0500 |
commit | ce28e056c20bf2723f565bbf464b87781ec248a2 (patch) | |
tree | ef7b0501c4de4b631a916305cbc2a5fdc125e52d /linden/indra/llcommon/lldefs.h | |
parent | Second Life viewer sources 1.19.1.4b (diff) | |
download | meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.zip meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.gz meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.bz2 meta-impy-ce28e056c20bf2723f565bbf464b87781ec248a2.tar.xz |
Second Life viewer sources 1.20.2
Diffstat (limited to 'linden/indra/llcommon/lldefs.h')
-rw-r--r-- | linden/indra/llcommon/lldefs.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/linden/indra/llcommon/lldefs.h b/linden/indra/llcommon/lldefs.h index d081245..0e69626 100644 --- a/linden/indra/llcommon/lldefs.h +++ b/linden/indra/llcommon/lldefs.h | |||
@@ -218,7 +218,15 @@ inline LLDATATYPE llmin(const LLDATATYPE& d1, const LLDATATYPE& d2, const LLDATA | |||
218 | template <class LLDATATYPE> | 218 | template <class LLDATATYPE> |
219 | inline LLDATATYPE llclamp(const LLDATATYPE& a, const LLDATATYPE& minval, const LLDATATYPE& maxval) | 219 | inline LLDATATYPE llclamp(const LLDATATYPE& a, const LLDATATYPE& minval, const LLDATATYPE& maxval) |
220 | { | 220 | { |
221 | return llmin(llmax(a, minval), maxval); | 221 | if ( a < minval ) |
222 | { | ||
223 | return minval; | ||
224 | } | ||
225 | else if ( a > maxval ) | ||
226 | { | ||
227 | return maxval; | ||
228 | } | ||
229 | return a; | ||
222 | } | 230 | } |
223 | 231 | ||
224 | template <class LLDATATYPE> | 232 | template <class LLDATATYPE> |
@@ -234,3 +242,4 @@ inline LLDATATYPE llclampb(const LLDATATYPE& a) | |||
234 | } | 242 | } |
235 | 243 | ||
236 | #endif // LL_LLDEFS_H | 244 | #endif // LL_LLDEFS_H |
245 | |||