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:39:15 (GMT) |
commit | ace3bf7a527284c875ded6cb01491a6c817187ba (patch) | |
tree | fdbc6f2a996956f81e801a6e7f7c4b5199e3bd86 | |
parent | d9dffa5f4a1df01c105eeee929d8d53c2cae026f (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): |