diff options
author | Dave Parks <davep@lindenlab.com> | 2011-08-04 23:43:54 -0500 |
---|---|---|
committer | Dave Parks <davep@lindenlab.com> | 2011-08-04 23:43:54 -0500 |
commit | 575c7f85b20fca57fcd97a2a18bd7ad0c030a935 (patch) | |
tree | 10df43813ed4787c5ca41442205ce1bf0062cfe7 /indra/llprimitive/llmodel.h | |
parent | 7633b3f1f1191443ae153c02d71dd968b46a2334 (diff) | |
parent | df94d0c778e63ce053cfd1fa4423b180bab6adfb (diff) |
merge
Diffstat (limited to 'indra/llprimitive/llmodel.h')
-rw-r--r-- | indra/llprimitive/llmodel.h | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index b5dd9bf87d..9a7b9fa271 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -219,20 +219,17 @@ public: }; - struct JointPositionalCompare + //Are the doubles the same w/in epsilon specified tolerance + bool areEqual( double a, double b ) { - //Are the doubles the same w/in epsilon specified tolerance - bool areEqual( double a, double b ) - { - const float epsilon = 1e-5f; - return (abs((int)(a - b)) < epsilon) && (a < b); - } - //Make sure that we return false for any values that are within the tolerance for equivalence - bool operator() ( const LLVector3& a, const LLVector3& b ) - { - return ( areEqual( a[0],b[0]) && areEqual( a[1],b[1] ) && areEqual( a[2],b[2]) ) ? false : true; - } - }; + const float epsilon = 1e-5f; + return (fabs((a - b)) < epsilon) ? true : false ; + } + //Make sure that we return false for any values that are within the tolerance for equivalence + bool jointPositionalLookup( const LLVector3& a, const LLVector3& b ) + { + return ( areEqual( a[0],b[0]) && areEqual( a[1],b[1] ) && areEqual( a[2],b[2]) ) ? true : false; + } //copy of position array for this model -- mPosition[idx].mV[X,Y,Z] std::vector<LLVector3> mPosition; |