Merge lp:~alan-griffiths/compiz-expo-plugin/Bug-918554 into lp:compiz-expo-plugin

Proposed by Alan Griffiths
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 140
Merged at revision: 140
Proposed branch: lp:~alan-griffiths/compiz-expo-plugin/Bug-918554
Merge into: lp:compiz-expo-plugin
Diff against target: 27 lines (+4/-4)
1 file modified
src/expo.cpp (+4/-4)
To merge this branch: bzr merge lp:~alan-griffiths/compiz-expo-plugin/Bug-918554
Reviewer Review Type Date Requested Status
Sam Spilsbury Needs Fixing
Review via email: mp+89205@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Can you replace that with an inline function in compiz-core ? there are other plugins that have a similar macro, and having the same thing multiple times in the code is probably not a great thing ...

review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/expo.cpp'
--- src/expo.cpp 2011-09-20 14:38:27 +0000
+++ src/expo.cpp 2012-01-19 10:20:28 +0000
@@ -423,10 +423,10 @@
423 {423 {
424 float fi = (float) i;424 float fi = (float) i;
425425
426 vpNormals[i * 3] = (-sin (fi * DEG2RAD) / screen->width ()) *426 vpNormals[i * 3] = (-sin (fi * (M_PI / 180.0f)) / screen->width ()) *
427 expoCam;427 expoCam;
428 vpNormals[(i * 3) + 1] = 0.0;428 vpNormals[(i * 3) + 1] = 0.0;
429 vpNormals[(i * 3) + 2] = (-cos (fi * DEG2RAD) * expoCam) -429 vpNormals[(i * 3) + 2] = (-cos (fi * (M_PI / 180.0f)) * expoCam) -
430 (1 - expoCam);430 (1 - expoCam);
431 }431 }
432 }432 }
@@ -857,9 +857,9 @@
857 curveAngle = interpolate (180 / vpSize.x (), 1, optionGetCurve ());857 curveAngle = interpolate (180 / vpSize.x (), 1, optionGetCurve ());
858858
859 curveDistance = ((0.5f * sx) + (gapX / 2.0)) /859 curveDistance = ((0.5f * sx) + (gapX / 2.0)) /
860 tanf (DEG2RAD * curveAngle / 2.0);860 tanf ((M_PI / 180.0f) * curveAngle / 2.0);
861 curveRadius = ((0.5f * sx) + (gapX / 2.0)) /861 curveRadius = ((0.5f * sx) + (gapX / 2.0)) /
862 sinf (DEG2RAD * curveAngle / 2.0);862 sinf ((M_PI / 180.0f) * curveAngle / 2.0);
863863
864 expoActive = true;864 expoActive = true;
865865

Subscribers

People subscribed via source and target branches

to all changes: