diff options
author | Merov Linden <merov@lindenlab.com> | 2011-10-05 14:57:19 -0700 |
---|---|---|
committer | Merov Linden <merov@lindenlab.com> | 2011-10-05 14:57:19 -0700 |
commit | d41f496510a2bc489efb9ae4479a70646eb989b8 (patch) | |
tree | d11fd42ebdafd26bd76231c3ae56ca22410b2d86 /indra/llmath/llmath.h | |
parent | 00dc8b3982cf69dbe69b8c1913e701c37f22eba0 (diff) | |
parent | eda12bd009d8f71eb82b6e6238335a172d6e5fb0 (diff) |
EXP-1202 : pull from richard/viewer-experience-fui
Diffstat (limited to 'indra/llmath/llmath.h')
-rw-r--r-- | indra/llmath/llmath.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index eea7c977fb..9297bcbac2 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -510,6 +510,13 @@ inline void ll_remove_outliers(std::vector<VEC_TYPE>& data, F32 k) VEC_TYPE Q1 = data[data.size()/4]; VEC_TYPE Q3 = data[data.size()-data.size()/4-1]; + if ((F32)(Q3-Q1) < 1.f) + { + // not enough variation to detect outliers + return; + } + + VEC_TYPE min = (VEC_TYPE) ((F32) Q1-k * (F32) (Q3-Q1)); VEC_TYPE max = (VEC_TYPE) ((F32) Q3+k * (F32) (Q3-Q1)); |