diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-08-28 19:01:28 -0400 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-08-28 19:01:28 -0400 |
commit | 109f669470cce934af6231db967c4385389b2a68 (patch) | |
tree | 64fd46d75e28eead865efa20e178e471347cd52a | |
parent | 8769f3bc76fa94b458c41b68b85701bd12029974 (diff) |
math: Add square procedure.
* sly/math.scm (square): New procedure.
-rw-r--r-- | sly/math.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sly/math.scm b/sly/math.scm index 55d176e..0f7ede3 100644 --- a/sly/math.scm +++ b/sly/math.scm @@ -33,7 +33,7 @@ cotan clamp linear-scale - half)) + half square)) ;; Dave was editing this module on Pi Approximation Day. ;; @@ -106,3 +106,6 @@ actually less than MAX." (define (half x) (/ x 2)) + +(define (square x) + (* x x)) |