RosettaCodeData/Task/Map-range/Emacs-Lisp/map-range.el

6 lines
146 B
EmacsLisp
Raw Permalink Normal View History

2026-04-30 12:34:36 -04:00
(defun maprange (a1 a2 b1 b2 s)
(+ b1 (/ (* (- s a1) (- b2 b1)) (- a2 a1))))
(dotimes (i 10)
(message "%s" (maprange 0.0 10.0 -1.0 0.0 i)))