summaryrefslogtreecommitdiff
path: root/indra/llprimitive/llmodel.h
diff options
context:
space:
mode:
authorAlexander Gavriliuk <alexandrgproductengine@lindenlab.com>2024-05-06 16:52:34 +0200
committerGuru <alexandrgproductengine@lindenlab.com>2024-05-07 10:18:51 +0200
commitf9473e8afcb624cc1b101195bf15943ec372b56f (patch)
tree27a9f85fa0ca8c9dd2138a5522e7a7970a063941 /indra/llprimitive/llmodel.h
parent15d4db0b5d52097de33ea036b8a1a4b7f5384e3f (diff)
secondlife/viewer#1333 BOOL to bool conversion leftovers: ternaries
Diffstat (limited to 'indra/llprimitive/llmodel.h')
-rw-r--r--indra/llprimitive/llmodel.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h
index 1242646a8a..bcd33ba2db 100644
--- a/indra/llprimitive/llmodel.h
+++ b/indra/llprimitive/llmodel.h
@@ -256,17 +256,18 @@ public:
}
};
-
//Are the doubles the same w/in epsilon specified tolerance
bool areEqual( double a, double b )
{
const float epsilon = 1e-5f;
- return (fabs((a - b)) < epsilon) ? true : false ;
+ return fabs(a - b) < epsilon;
}
+
//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;
+ const float epsilon = 1e-5f;
+ return (a - b).length() < epsilon;
}
//copy of position array for this model -- mPosition[idx].mV[X,Y,Z]