tendency x low high &key :scale :offset :return-type :random :state [Function]

Returns a random value between the value of x in low and high envelopes with optional :scale and :offset values applied. A constant envelope may be expressed as a simple numeric value. The type of the value returned normally depends on the type of the arguments specified to the function. Use :return-type to force the return value to be either float, integer or ratio. float may be specified as a list (float digits) in which case the floating point return value will be rounded to digitnumber of places. :random allows a random generator other than random to be used. The generator is passed two arguments, the floating point range between high and low and a random state object.

Example:

? (loop for i by .2 to 2
        collect (tendency i '(0 0 1.5 .5) '(0 1 1.5 .75))
(.37 .77 .62 .50 .44 .34 .75 .48 .55 .66 .69)

See Also:

interpl, between


Last Modified: 5-Mar-1998