(index ("factorial" 0) ("rationalize" 294) ("tween" 754) ("interpolate" 1413))
(def (sig (procedure "(factorial n)" (id factorial))) (p "Memoized implementation of the factorial method. Provides O(n) computation, albeit with an O(1) average case. Requires O(n) memory.") (p "You may reset the memory by whiping out the cache: " (tt "(set! factorial* (make-vector 1 1))")))
(def (sig (procedure "(rationalize count value #!optional (epsilon 0))" (id rationalize))) (p "Sometimes its useful to truncate the number of decimal places a floating point number is exact to. Sometimes it's also useful to do so after applying an epsilon value to smudge for floating point computation errors. This function can perform both operations.") (p "Note that it is *not* a function to force a number to a particular number of significant digits."))
(def (sig (procedure "(tween easing-function direction start stop percent)" (id tween))) (p "Given an " (tt "easing-function") " and a " (tt "direction") ", this produces a value between " (tt "start") " and " (tt "stop") " that is representative of the provided " (tt "percent") ".") (p (tt "direction") " may be one of the following symbols:") (ul (li "in") (li "out") (li "inout")) (p (tt "percent") " must be a value between 0.0 and 1.0.") (p (tt "start") " and " (tt "stop") " must be numbers.") (p (tt "easing-function") " be of the form " (tt "direction -> percent -> percent") ".") (p "Various easing functions are provided by this egg, see below."))
(def (sig (procedure "(interpolate selector-function value-vector percent)" (id interpolate))) (p "Given a " (tt "selector-function") " this produces a value within the range of values defined in " (tt "value-vector") " that is representative of the provided " (tt "percent") ".") (p (tt "value-vector") " must be a vector of numbers.") (p (tt "percent") " must be a value between 0.0 and 1.0.") (p (tt "selector-function") " must be of the form " (tt "value-vector -> percent -> number")) (p "Various selector functions are provided by this egg, see below."))
