emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/golden-ratio 65db8b88aa 06/95: Added a constant to hold th


From: ELPA Syncer
Subject: [nongnu] elpa/golden-ratio 65db8b88aa 06/95: Added a constant to hold the golden ratio value.
Date: Thu, 7 Sep 2023 22:02:09 -0400 (EDT)

branch: elpa/golden-ratio
commit 65db8b88aaeb2df5f58f45432be5ed42a8aa421b
Author: Diego Sevilla Ruiz <dsevilla@ditec.um.es>
Commit: Diego Sevilla Ruiz <dsevilla@ditec.um.es>

    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

[Prev in Thread] Current Thread [Next in Thread]