User-defined functions

 

You can write your own functions, easy to paste into new scripts.  Example: Colorators
User defined function
--put above default
--has its own code block
Code Blocks
User-defined functions  Items in bold text below are important programming topics.
float randFMTO(float FM, float TO)
{ return llFrand(TO- FM) + FM; }

Gets random number in the range FM -- TO.

float loclip (float num, float clipat )
{ num = num + .5- clipat ;
float Result = num * llRound (num);
return Result; }
num is number (usually random) between 0 and 1; clipat is clip point. Numbers less than clipat are set to zero.
The Thinkerer 05/09/2008
Copyright (c) D. F. Dansereau & S. H. Evans

Site Map

Where start?

LODScr
Famous fables