LLMath V3 partial merge.

This commit is contained in:
Shyotl
2011-08-29 03:21:05 -05:00
parent 59d50f3062
commit 60c122ee15
4 changed files with 11 additions and 6 deletions

View File

@@ -37,8 +37,8 @@
#include <cstdlib>
#include <vector>
#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<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));

View File

@@ -34,7 +34,8 @@
#include "stdtypes.h"
#include "xform.h"
#include "llmemory.h"
#include "llpointer.h"
#include "llrefcount.h"
#include <vector>
template <class T> class LLTreeNode;

View File

@@ -52,8 +52,6 @@
//
// Sorry the code is such a mess. JC
#include "llpreprocessor.h"
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
// LLV4MATH - GNUC

View File

@@ -36,7 +36,7 @@
#include <map>
#include "llvolume.h"
#include "llmemory.h"
#include "llpointer.h"
#include "llthread.h"
class LLVolumeParams;