diff options
author | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
---|---|---|
committer | Steven Bennetts <steve@lindenlab.com> | 2007-03-02 21:25:50 +0000 |
commit | 4dabd9c0472deb49573fdafef2fa413e59703f19 (patch) | |
tree | 06c680d6a2047e03838d6548bccd26c7baf9d652 /indra/llmath/v2math.h | |
parent | d4462963c6ba5db2088723bbedc7b60f1184c594 (diff) |
merge release@58699 beta-1-14-0@58707 -> release
Diffstat (limited to 'indra/llmath/v2math.h')
-rw-r--r-- | indra/llmath/v2math.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/indra/llmath/v2math.h b/indra/llmath/v2math.h index c94333e2a9..863318551e 100644 --- a/indra/llmath/v2math.h +++ b/indra/llmath/v2math.h @@ -298,6 +298,21 @@ inline LLVector2 operator-(const LLVector2 &a) return LLVector2( -a.mV[0], -a.mV[1] ); } +inline void update_min_max(LLVector2& min, LLVector2& max, const LLVector2& pos) +{ + for (U32 i = 0; i < 2; i++) + { + if (min.mV[i] > pos.mV[i]) + { + min.mV[i] = pos.mV[i]; + } + if (max.mV[i] < pos.mV[i]) + { + max.mV[i] = pos.mV[i]; + } + } +} + inline std::ostream& operator<<(std::ostream& s, const LLVector2 &a) { s << "{ " << a.mV[VX] << ", " << a.mV[VY] << " }"; |