summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-10-13 17:16:22 -0400
committerOz Linden <oz@lindenlab.com>2014-10-13 17:16:22 -0400
commite7c33a5071532820aeed814ba8d736afa166b882 (patch)
treea5aa02e1efb03e7f5949847925a98835ecba74e1
parentd7e403a8352493437e8dd600550a00703ae5c4b1 (diff)
parent5634cc990d71d34e330f87e838be44f60f496bd9 (diff)
merge changes for STORM-2078
-rwxr-xr-xdoc/contributions.txt3
-rwxr-xr-xindra/newview/llmaniprotate.cpp10
2 files changed, 8 insertions, 5 deletions
diff --git a/doc/contributions.txt b/doc/contributions.txt
index 8987f82022..c82ace2ca5 100755
--- a/doc/contributions.txt
+++ b/doc/contributions.txt
@@ -889,6 +889,8 @@ Mm Alder
VWR-4794
VWR-13578
Mo Hax
+Moon Metty
+ STORM-2078
Mourna Biziou
Mr Greggan
VWR-445
@@ -1401,6 +1403,7 @@ Whirly Fizzle
MAINT-873
STORM-1930
BUG-6659
+ STORM-2078
Whoops Babii
VWR-631
VWR-1640
diff --git a/indra/newview/llmaniprotate.cpp b/indra/newview/llmaniprotate.cpp
index 7861573908..b2350e5a75 100755
--- a/indra/newview/llmaniprotate.cpp
+++ b/indra/newview/llmaniprotate.cpp
@@ -1240,10 +1240,10 @@ LLQuaternion LLManipRotate::dragUnconstrained( S32 x, S32 y )
F32 dist_from_sphere_center = sqrt(delta_x * delta_x + delta_y * delta_y);
LLVector3 axis = mMouseDown % mMouseCur;
+ F32 angle = atan2(sqrtf(axis * axis), mMouseDown * mMouseCur);
axis.normVec();
- F32 angle = acos(mMouseDown * mMouseCur);
LLQuaternion sphere_rot( angle, axis );
-
+
if (is_approx_zero(1.f - mMouseDown * mMouseCur))
{
return LLQuaternion::DEFAULT;
@@ -1638,9 +1638,9 @@ LLQuaternion LLManipRotate::dragConstrained( S32 x, S32 y )
mInSnapRegime = FALSE;
}
- angle = acos(mMouseCur * mMouseDown);
-
- F32 dir = (mMouseDown % mMouseCur) * constraint_axis; // cross product
+ LLVector3 cross_product = mMouseDown % mMouseCur;
+ angle = atan2(sqrtf(cross_product * cross_product), mMouseCur * mMouseDown);
+ F32 dir = cross_product * constraint_axis; // cross product
if( dir < 0.f )
{
angle *= -1.f;