diff options
author | Martin Dengler <martin@martindengler.com> | 2008-09-18 21:50:41 (GMT) |
---|---|---|
committer | Martin Dengler <martin@martindengler.com> | 2008-09-18 22:15:01 (GMT) |
commit | 350b123c86c620c77e2bcefb7b906cc930d29b2f (patch) | |
tree | feac7f6fa9f8e2f5bb97e0bd80c1d7b9908140ec | |
parent | b4c1c89e3770699b132c8acf09c7e7639096ebc3 (diff) |
#7685 inline golden ratio/angle calculations in new favorites view code
-rw-r--r-- | src/view/home/favoriteslayout.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/view/home/favoriteslayout.py b/src/view/home/favoriteslayout.py index cc385f2..023284a 100644 --- a/src/view/home/favoriteslayout.py +++ b/src/view/home/favoriteslayout.py @@ -303,19 +303,17 @@ the XO man in the center. Since r = _SUNFLOWER_CONSTANT * sqrt(n), solve for n when r is (XLARGE_ICON_SIZE + STANDARD_ICON_SIZE)/2. """ -_GOLDEN_RATIO = (math.sqrt(5) + 1) / 2 +_GOLDEN_RATIO = 1.6180339887498949 """ Golden ratio: http://en.wikipedia.org/wiki/Golden_ratio Calculation: (math.sqrt(5) + 1) / 2 -Result: 1.6180339887498949 """ -_SUNFLOWER_ANGLE = math.radians(360) / ( _GOLDEN_RATIO * _GOLDEN_RATIO ) +_SUNFLOWER_ANGLE = 2.3999632297286531 """ The sunflower angle is approximately 137.5 degrees. This is the golden angle: http://en.wikipedia.org/wiki/Golden_angle Calculation: math.radians(360) / ( _GOLDEN_RATIO * _GOLDEN_RATIO ) -Result: 2.3999632297286531 """ class SunflowerLayout(RingLayout): |