diff options
author | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:44:50 -0500 |
commit | 89fe5dab825a62a0e3fd8d248cbc91c65eb2a426 (patch) | |
tree | bcff14b7888d04a2fec799c59369f6095224bd08 /linden/indra/llmath/v2math.h | |
parent | Second Life viewer sources 1.13.3.2 (diff) | |
download | meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.zip meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.gz meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.bz2 meta-impy-89fe5dab825a62a0e3fd8d248cbc91c65eb2a426.tar.xz |
Second Life viewer sources 1.14.0.0
Diffstat (limited to '')
-rw-r--r-- | linden/indra/llmath/v2math.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linden/indra/llmath/v2math.h b/linden/indra/llmath/v2math.h index 1832403..c978fc0 100644 --- a/linden/indra/llmath/v2math.h +++ b/linden/indra/llmath/v2math.h | |||
@@ -317,6 +317,21 @@ inline LLVector2 operator-(const LLVector2 &a) | |||
317 | return LLVector2( -a.mV[0], -a.mV[1] ); | 317 | return LLVector2( -a.mV[0], -a.mV[1] ); |
318 | } | 318 | } |
319 | 319 | ||
320 | inline void update_min_max(LLVector2& min, LLVector2& max, const LLVector2& pos) | ||
321 | { | ||
322 | for (U32 i = 0; i < 2; i++) | ||
323 | { | ||
324 | if (min.mV[i] > pos.mV[i]) | ||
325 | { | ||
326 | min.mV[i] = pos.mV[i]; | ||
327 | } | ||
328 | if (max.mV[i] < pos.mV[i]) | ||
329 | { | ||
330 | max.mV[i] = pos.mV[i]; | ||
331 | } | ||
332 | } | ||
333 | } | ||
334 | |||
320 | inline std::ostream& operator<<(std::ostream& s, const LLVector2 &a) | 335 | inline std::ostream& operator<<(std::ostream& s, const LLVector2 &a) |
321 | { | 336 | { |
322 | s << "{ " << a.mV[VX] << ", " << a.mV[VY] << " }"; | 337 | s << "{ " << a.mV[VX] << ", " << a.mV[VY] << " }"; |