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
1=== modified file 'src/expo.cpp'
2--- src/expo.cpp 2011-09-20 14:38:27 +0000
3+++ src/expo.cpp 2012-01-19 10:20:28 +0000
4@@ -423,10 +423,10 @@
5 {
6 float fi = (float) i;
7
8- vpNormals[i * 3] = (-sin (fi * DEG2RAD) / screen->width ()) *
9+ vpNormals[i * 3] = (-sin (fi * (M_PI / 180.0f)) / screen->width ()) *
10 expoCam;
11 vpNormals[(i * 3) + 1] = 0.0;
12- vpNormals[(i * 3) + 2] = (-cos (fi * DEG2RAD) * expoCam) -
13+ vpNormals[(i * 3) + 2] = (-cos (fi * (M_PI / 180.0f)) * expoCam) -
14 (1 - expoCam);
15 }
16 }
17@@ -857,9 +857,9 @@
18 curveAngle = interpolate (180 / vpSize.x (), 1, optionGetCurve ());
19
20 curveDistance = ((0.5f * sx) + (gapX / 2.0)) /
21- tanf (DEG2RAD * curveAngle / 2.0);
22+ tanf ((M_PI / 180.0f) * curveAngle / 2.0);
23 curveRadius = ((0.5f * sx) + (gapX / 2.0)) /
24- sinf (DEG2RAD * curveAngle / 2.0);
25+ sinf ((M_PI / 180.0f) * curveAngle / 2.0);
26
27 expoActive = true;
28

Subscribers

People subscribed via source and target branches

to all changes: