summaryrefslogtreecommitdiff
path: root/indra/newview/llselectmgr.cpp
diff options
context:
space:
mode:
authorRicky Curtice <kf6kjg+hg@gmail.com>2011-04-25 16:24:16 -0700
committerRicky Curtice <kf6kjg+hg@gmail.com>2011-04-25 16:24:16 -0700
commit26f2762b89705a69e831016ea67af9500907721d (patch)
treeb1a09f54fa4c414e4f9b4987c1d1e3c99206e314 /indra/newview/llselectmgr.cpp
parentca186a64014942540baaf280bb3967d2582336bd (diff)
Removed an extra variable I'd added.
Also cleaned up some whitespace-around-operator issues. While removing the extra variable seems to make the code more ugly, all it does is reveal the pre-existing ugliness that had been masked in the past. Trying to find a fix, or even try to come to a real understanding of why this section of code is the way it is, is out of my scope for this task.
Diffstat (limited to 'indra/newview/llselectmgr.cpp')
-rw-r--r--indra/newview/llselectmgr.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp
index 2c5073d027..96468c0b21 100644
--- a/indra/newview/llselectmgr.cpp
+++ b/indra/newview/llselectmgr.cpp
@@ -6585,16 +6585,12 @@ bool LLSelectMgr::selectionMove(const LLVector3& displ,
}
}
- // get the non-squared edition for use below
- // note the use of fsqrtf, this was used in the definition of dist_vec() and is therefore re-used here
- F32 min_dist = fsqrtf(min_dist_squared);
-
// factor the distance into the displacement vector. This will get us
// equally visible movements for both close and far away selections.
- F32 min_dist_factored = sqrt(min_dist) / 2; // FIXME: this variable name doesn't state its true meaning.
- displ_global.setVec(displ.mV[0]*min_dist_factored,
- displ.mV[1]*min_dist_factored,
- displ.mV[2]*min_dist_factored);
+ F32 min_dist = sqrt(fsqrtf(min_dist_squared)) / 2;
+ displ_global.setVec(displ.mV[0] * min_dist,
+ displ.mV[1] * min_dist,
+ displ.mV[2] * min_dist);
// equates to: Displ_global = Displ * M_cam_axes_in_global_frame
displ_global = LLViewerCamera::getInstance()->rotateToAbsolute(displ_global);