diff options
author | Thanos Apollo <[email protected]> | 2024-03-01 22:22:13 +0200 |
---|---|---|
committer | Thanos Apollo <[email protected]> | 2024-03-01 22:22:13 +0200 |
commit | 2a56855b26ec09098957f83611e2c30277283d36 (patch) | |
tree | c77f53b50ee9b153a4b5ef09724cc7349fd7558a /gnosis-algorithm.el | |
parent | 249cb3338eff23c98b510cded42959332a8b7b5a (diff) |
Add gnosis-algorithm-round-items
Diffstat (limited to 'gnosis-algorithm.el')
-rw-r--r-- | gnosis-algorithm.el | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnosis-algorithm.el b/gnosis-algorithm.el index da9a070..35248b9 100644 --- a/gnosis-algorithm.el +++ b/gnosis-algorithm.el @@ -80,6 +80,10 @@ NOTE: Do not change this value above 1" for i from 0 collect (if (= i index) new-item item))) +(defun gnosis-algorithm-round-items (list) + "Round all items in LIST to 2 decimal places." + (cl-loop for item in list + collect (/ (round (* item 100)) 100.0))) (defun gnosis-algorithm-date (&optional offset) "Return the current date in a list (year month day). |