From 904f6124b282e3e9668289bef9f7d44f8539ce51 Mon Sep 17 00:00:00 2001 From: Tofu Linden Date: Fri, 6 Nov 2009 13:27:28 +0000 Subject: magic number removal rampage: 3.14159 -> M_PI or F_PI --HG-- branch : texture-pipeline --- indra/newview/llvovolume.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'indra/newview/llvovolume.cpp') diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index 1704f63376..421e6fdff5 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)); -- cgit v1.2.3