diff options
-rw-r--r-- | indra/newview/llfloaterworldmap.cpp | 2 | ||||
-rw-r--r-- | indra/newview/lltracker.cpp | 6 | ||||
-rw-r--r-- | indra/newview/llvoavatar.cpp | 4 | ||||
-rw-r--r-- | indra/newview/llvovolume.cpp | 8 | ||||
-rw-r--r-- | indra/newview/llworldmapview.cpp | 2 | ||||
-rw-r--r-- | indra/newview/pipeline.cpp | 2 |
6 files changed, 12 insertions, 12 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp index 6567c1a649..823c8e7911 100644 --- a/indra/newview/llfloaterworldmap.cpp +++ b/indra/newview/llfloaterworldmap.cpp @@ -457,7 +457,7 @@ void LLFloaterWorldMap::draw() { F64 seconds = LLTimer::getElapsedSeconds(); double value = fmod(seconds, 2); - value = 0.5 + 0.5*cos(value * 3.14159f); + value = 0.5 + 0.5*cos(value * M_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); childSetColor("location_icon", loading_color); } diff --git a/indra/newview/lltracker.cpp b/indra/newview/lltracker.cpp index 5929ecd928..1a61717658 100644 --- a/indra/newview/lltracker.cpp +++ b/indra/newview/lltracker.cpp @@ -416,10 +416,10 @@ F32 pulse_func(F32 t, F32 z) return 0.f; } - t *= 3.14159f; + t *= F_PI; z -= t*64.f - 256.f; - F32 a = cosf(z*3.14159/512.f)*10.0f; + F32 a = cosf(z*F_PI/512.f)*10.0f; a = llmax(a, 9.9f); a -= 9.9f; a *= 10.f; @@ -433,7 +433,7 @@ void draw_shockwave(F32 center_z, F32 t, S32 steps, LLColor4 color) return; } - t *= 0.6284f/3.14159f; + t *= 0.6284f/F_PI; t -= (F32) (S32) t; diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp index 240f87d104..60ab6f8075 100644 --- a/indra/newview/llvoavatar.cpp +++ b/indra/newview/llvoavatar.cpp @@ -2385,7 +2385,7 @@ void LLVOAvatar::idleUpdateMisc(bool detailed_update) F32 old_angle = mImpostorAngle.mV[i]; F32 angle_diff = fabsf(cur_angle-old_angle); - if (angle_diff > 3.14159f/512.f*distance*mUpdatePeriod) + if (angle_diff > F_PI/512.f*distance*mUpdatePeriod) { mNeedsImpostorUpdate = TRUE; } @@ -2557,7 +2557,7 @@ void LLVOAvatar::idleUpdateLoadingEffect() particle_parameters.mPartImageID = cloud->getID(); particle_parameters.mMaxAge = 0.f; particle_parameters.mPattern = LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE; - particle_parameters.mInnerAngle = 3.14159f; + particle_parameters.mInnerAngle = F_PI; particle_parameters.mOuterAngle = 0.f; particle_parameters.mBurstRate = 0.02f; particle_parameters.mBurstRadius = 0.0f; diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index caeda3d1db..f6343b4134 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -739,15 +739,15 @@ F32 LLVOVolume::getTextureVirtualSize(LLFace* face) face->setPixelArea(face_area); - if (face_area <= 0) + if (face_area <= 0.f) { return 0.f; } //get area of circle in texture space LLVector2 tdim = face->mTexExtents[1] - face->mTexExtents[0]; - F32 texel_area = (tdim * 0.5f).lengthSquared()*3.14159f; - if (texel_area <= 0) + F32 texel_area = (tdim * 0.5f).lengthSquared()*F_PI; + if (texel_area <= 0.f) { // Probably animated, use default texel_area = 1.f; @@ -1036,7 +1036,7 @@ BOOL LLVOVolume::calcLOD() } // DON'T Compensate for field of view changing on FOV zoom. - distance *= 3.14159f/3.f; + distance *= F_PI/3.f; cur_detail = computeLODDetail(llround(distance, 0.01f), llround(radius, 0.01f)); diff --git a/indra/newview/llworldmapview.cpp b/indra/newview/llworldmapview.cpp index 920415873e..0509898f40 100644 --- a/indra/newview/llworldmapview.cpp +++ b/indra/newview/llworldmapview.cpp @@ -822,7 +822,7 @@ void LLWorldMapView::draw() else { double value = fmod(current_time, 2); - value = 0.5 + 0.5*cos(value * 3.14159f); + value = 0.5 + 0.5*cos(value * M_PI); LLColor4 loading_color(0.0, F32(value/2), F32(value), 1.0); drawTracking( LLWorldMap::getInstance()->mUnknownLocation, loading_color, TRUE, getString("Loading"), ""); } diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 0dc1a88ee8..3390463aa6 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -1474,7 +1474,7 @@ F32 LLPipeline::calcPixelArea(LLVector3 center, LLVector3 size, LLCamera &camera //get area of circle around node F32 app_angle = atanf(size.length()/dist); F32 radius = app_angle*LLDrawable::sCurPixelAngle; - return radius*radius * 3.14159f; + return radius*radius * F_PI; } void LLPipeline::grabReferences(LLCullResult& result) |