Created
August 29, 2020 04:09
-
-
Save deltam/554ae5522b80732ef6dc2b814aeebb06 to your computer and use it in GitHub Desktop.
サワードウブレッドの分量計算
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun my/sourdough (flour hydra) | |
(let* ((flour-rate (/ flour 100.0)) | |
(hydra-rate (/ hydra 100.0)) | |
(dough (* 40 flour-rate)) | |
(water (* flour-rate (- (* hydra-rate 120) 20))) | |
(salt (* 2.4 flour-rate))) | |
(list dough water salt))) | |
(defun my/sourdough-recipe (flour hydra) | |
(interactive "n小麦粉(g):\nn加水率(%):\n") | |
(let* ((ret (my/sourdough flour hydra)) | |
(dough (nth 0 ret)) | |
(water (nth 1 ret)) | |
(salt (nth 2 ret))) | |
(message "50:50のサワードウ %0.1fg, 水 %0.1fg, 塩 %0.1fg" dough water salt))) | |
(defun my/insert-sourdough-recipe (flour hydra) | |
(interactive "n小麦粉(g):\nn加水率(%):\n") | |
(let* ((ret (my/sourdough flour hydra)) | |
(dough (nth 0 ret)) | |
(water (nth 1 ret)) | |
(salt (nth 2 ret))) | |
(insert | |
(message "小麦粉 %0.1fg, 加水率 %d%%\n50:50のサワードウ %0.1fg\n水 %0.1fg\n塩 %0.1fg" flour hydra dough water salt)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment