From 60c122ee15bfda1f2c85163cad3ce65f568ec74d Mon Sep 17 00:00:00 2001 From: Shyotl Date: Mon, 29 Aug 2011 03:21:05 -0500 Subject: [PATCH] LLMath V3 partial merge. --- indra/llmath/llmath.h | 10 ++++++++-- indra/llmath/lltreenode.h | 3 ++- indra/llmath/llv4math.h | 2 -- indra/llmath/llvolumemgr.h | 2 +- 4 files changed, 11 insertions(+), 6 deletions(-) diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 5853c9430..89ef7d616 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -37,8 +37,8 @@ #include #include #include "lldefs.h" -#include "llstl.h" // *TODO: Remove when LLString is gone -#include "llstring.h" // *TODO: Remove when LLString is gone +//#include "llstl.h" // *TODO: Remove when LLString is gone +//#include "llstring.h" // *TODO: Remove when LLString is gone // lltut.h uses is_approx_equal_fraction(). This was moved to its own header // file in llcommon so we can use lltut.h for llcommon tests without making // llcommon depend on llmath. @@ -516,6 +516,12 @@ inline void ll_remove_outliers(std::vector& 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)); diff --git a/indra/llmath/lltreenode.h b/indra/llmath/lltreenode.h index 6c23cdff9..ada1f0075 100644 --- a/indra/llmath/lltreenode.h +++ b/indra/llmath/lltreenode.h @@ -34,7 +34,8 @@ #include "stdtypes.h" #include "xform.h" -#include "llmemory.h" +#include "llpointer.h" +#include "llrefcount.h" #include template class LLTreeNode; diff --git a/indra/llmath/llv4math.h b/indra/llmath/llv4math.h index 9a493b267..5b180b3d7 100644 --- a/indra/llmath/llv4math.h +++ b/indra/llmath/llv4math.h @@ -52,8 +52,6 @@ // // Sorry the code is such a mess. JC -#include "llpreprocessor.h" - //----------------------------------------------------------------------------- //----------------------------------------------------------------------------- // LLV4MATH - GNUC diff --git a/indra/llmath/llvolumemgr.h b/indra/llmath/llvolumemgr.h index 28276e46f..f5dc4cd74 100644 --- a/indra/llmath/llvolumemgr.h +++ b/indra/llmath/llvolumemgr.h @@ -36,7 +36,7 @@ #include #include "llvolume.h" -#include "llmemory.h" +#include "llpointer.h" #include "llthread.h" class LLVolumeParams;