Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -r f747bb29e454 indra/newview/llmaniprotate.cpp
- --- a/indra/newview/llmaniprotate.cpp Mon Aug 18 14:36:17 2014 -0400
- +++ b/indra/newview/llmaniprotate.cpp Wed Aug 20 19:29:53 2014 +0100
- @@ -1239,12 +1239,12 @@
- F32 dist_from_sphere_center = sqrt(delta_x * delta_x + delta_y * delta_y);
- - LLVector3 axis = mMouseDown % mMouseCur;
- - axis.normVec();
- - F32 angle = acos(mMouseDown * mMouseCur);
- - LLQuaternion sphere_rot( angle, axis );
- -
- - if (is_approx_zero(1.f - mMouseDown * mMouseCur))
- + LLVector3 axis = mMouseDown % mMouseCur;
- + axis.normVec();
- + F32 angle = atan2(sqrtf(axis * axis), mMouseDown * mMouseCur);
- + LLQuaternion sphere_rot( angle, axis );
- +
- + if (is_approx_zero(1.f - mMouseDown * mMouseCur))
- {
- return LLQuaternion::DEFAULT;
- }
- @@ -1638,9 +1638,9 @@
- 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;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement