summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-08-15 22:48:12 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-08-25 19:33:07 -0400
commit40e772e9e493190ff3ba41440653782d8f17e5a0 (patch)
tree9aa99570b108f5e6e06de7b4bd1971a2364c2e45
parentddc414fcdd8939fc04fd823bc72a198345dba67c (diff)
Add half procedure.
* sly/math.scm (half): New procedure.
-rw-r--r--sly/math.scm6
1 files changed, 5 insertions, 1 deletions
diff --git a/sly/math.scm b/sly/math.scm
index 8dc5cbf..55d176e 100644
--- a/sly/math.scm
+++ b/sly/math.scm
@@ -32,7 +32,8 @@
atan-degrees
cotan
clamp
- linear-scale))
+ linear-scale
+ half))
;; Dave was editing this module on Pi Approximation Day.
;;
@@ -102,3 +103,6 @@ actually less than MAX."
(+ a
(/ (* (- b a) (- n min))
(- max min))))
+
+(define (half x)
+ (/ x 2))