From bab5ef916cb8e3645a4c26b2f7ea5be8a805c5bd Mon Sep 17 00:00:00 2001
From: Xiaohong Bao <bao@lindenlab.com>
Date: Mon, 19 Jul 2010 15:20:23 -0600
Subject: trivial: replace some very small constant numbers with
 "F_ALMOST_ZERO".

---
 indra/newview/llface.cpp          | 2 +-
 indra/newview/llviewertexture.cpp | 4 ++--
 indra/newview/llvotree.cpp        | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index dbbcb6e7c4..f299518474 100644
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -1364,7 +1364,7 @@ F32 LLFace::getTextureVirtualSize()
 	F32 cos_angle_to_view_dir;	
 	BOOL in_frustum = calcPixelArea(cos_angle_to_view_dir, radius);
 
-	if (mPixelArea < 0.0001f || !in_frustum)
+	if (mPixelArea < F_ALMOST_ZERO || !in_frustum)
 	{
 		setVirtualSize(0.f) ;
 		return 0.f;
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index 7bd5004a05..e38608bcfc 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -3699,7 +3699,7 @@ void LLTexturePipelineTester::updateStablizingTime()
 	{
 		F32 t = mEndStablizingTime - mStartStablizingTime ;
 
-		if(t > 0.0001f && (t - mTotalStablizingTime) < 0.0001f)
+		if(t > F_ALMOST_ZERO && (t - mTotalStablizingTime) < F_ALMOST_ZERO)
 		{
 			//already stablized
 			mTotalStablizingTime = LLImageGL::sLastFrameTime - mStartStablizingTime ;
@@ -3824,7 +3824,7 @@ LLMetricPerformanceTester::LLTestSession* LLTexturePipelineTester::loadTestSessi
 		//time
 		F32 start_time = (*log)[label]["StartFetchingTime"].asReal() ;
 		F32 cur_time   = (*log)[label]["Time"].asReal() ;
-		if(start_time - start_fetching_time > 0.0001f) //fetching has paused for a while
+		if(start_time - start_fetching_time > F_ALMOST_ZERO) //fetching has paused for a while
 		{
 			sessionp->mTotalFetchingTime += total_fetching_time ;
 			sessionp->mTotalGrayTime += total_gray_time ;
diff --git a/indra/newview/llvotree.cpp b/indra/newview/llvotree.cpp
index 10537a6eb5..0efe6682be 100644
--- a/indra/newview/llvotree.cpp
+++ b/indra/newview/llvotree.cpp
@@ -73,7 +73,7 @@ S32 LLVOTree::sLODVertexCount[sMAX_NUM_TREE_LOD_LEVELS];
 S32 LLVOTree::sLODIndexOffset[sMAX_NUM_TREE_LOD_LEVELS];
 S32 LLVOTree::sLODIndexCount[sMAX_NUM_TREE_LOD_LEVELS];
 S32 LLVOTree::sLODSlices[sMAX_NUM_TREE_LOD_LEVELS] = {10, 5, 4, 3};
-F32 LLVOTree::sLODAngles[sMAX_NUM_TREE_LOD_LEVELS] = {30.f, 20.f, 15.f, 0.00001f};
+F32 LLVOTree::sLODAngles[sMAX_NUM_TREE_LOD_LEVELS] = {30.f, 20.f, 15.f, F_ALMOST_ZERO};
 
 F32 LLVOTree::sTreeFactor = 1.f;
 
-- 
cgit v1.2.3