summaryrefslogtreecommitdiff
path: root/indra/llmath/v3math.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llmath/v3math.h')
-rw-r--r--indra/llmath/v3math.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/llmath/v3math.h b/indra/llmath/v3math.h
index 72372c07e9..f787fa2ac1 100644
--- a/indra/llmath/v3math.h
+++ b/indra/llmath/v3math.h
@@ -396,6 +396,20 @@ inline BOOL LLVector3::isNull() const
return FALSE;
}
+inline void update_min_max(LLVector3& min, LLVector3& max, const LLVector3& pos)
+{
+ for (U32 i = 0; i < 3; 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 F32 angle_between(const LLVector3& a, const LLVector3& b)
{