branch: elpa/golden-ratio
commit 65db8b88aaeb2df5f58f45432be5ed42a8aa421b
Author: Diego Sevilla Ruiz <[email protected]>
Commit: Diego Sevilla Ruiz <[email protected]>

    Added a constant to hold the golden ratio value.
    
    And changed the code to use it.
---
 golden-ratio.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/golden-ratio.el b/golden-ratio.el
index 639fc9faa9..3511a213f7 100644
--- a/golden-ratio.el
+++ b/golden-ratio.el
@@ -14,9 +14,12 @@
 
 ;;; Code:
 
+(defconst -golden-ratio-value 1.618
+  "The golden ratio value itself.")
+
 (defun -golden-ratio-dimensions ()
-  (let* ((main-rows     (floor (/ (frame-height) 1.618)))
-         (main-columns  (floor (/ (frame-width)  1.618))))
+  (let* ((main-rows     (floor (/ (frame-height) -golden-ratio-value)))
+         (main-columns  (floor (/ (frame-width)  -golden-ratio-value))))
     (list main-rows
           main-columns)))
 

Reply via email to