Instructor: Tiffany Holmes tholmes@artic.edu 312.345.3760
Lingo functions: random()
Example: This statement produces a random multiple of 5 in the range 5 to 100: x = 5 * random(20)
Exercises (single frame movies):
ADVANCED LINGO:
Lingo properties: the floatPrecision
The floatPrecision is a property; it rounds off the display of floating-point numbers to the number of decimal places specified. The value of floatPrecision must be an integer. The maximum value is 15 significant digits; the default value is 4.
Example: This statement produces a random two-point decimal value:
the floatPrecision = 2
y = random(100)/100.0 - .01
***Useful and interesting background reading: The New York Times, June 12, 2001, Connoisseurs of Chaos Offer a Valuable Product: Randomness, by George Johnson