Difference between revisions of "Category:LSL Needs Example"
Jump to navigation
Jump to search
(previous page) (next page)
m (Fixed very minor (but right is right) grammatical error.) |
Chaser Zaks (talk | contribs) (Updated <lsl> to <source>) |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 3: | Line 3: | ||
Example: [[llFrand]] (the order of the parameters in the definition has no effect on the rendering). | Example: [[llFrand]] (the order of the parameters in the definition has no effect on the rendering). | ||
< | <nowiki> {{LSL_Function | ||
{{LSL_Function | |sort=Frand | ||
|sort=Frand | |func=llFrand | ||
|func=llFrand | |func_id=8 | ||
|func_id=8 | |func_sleep=0.0 | ||
|func_sleep=0.0 | |func_energy=10.0 | ||
|func_energy=10.0 | |p1_type=float | ||
|p1_type=float | |p1_name=mag | ||
|p1_name=mag | |p1_desc=Any valid float value | ||
|p1_desc=Any valid float value | |return_type=float | ||
|return_type=float | |return_text=that is pseudo random number in the range [0.0,mag) or (mag, 0.0]. | ||
|return_text=that is pseudo random number in the range [0.0,mag) or (mag, 0.0]. | |spec=returns a pseudo random number in range [0.0, mag) or (mag, 0.0], depending upon the sign of mag. | ||
|spec=returns a pseudo random number in range [0.0, mag) or (mag, 0.0], depending upon the sign of mag. | |caveats | ||
|caveats | </nowiki><font style="color:red;"><nowiki>|examples=<source lang="lsl2">default | ||
|examples=< | { | ||
{ | touch_start(integer total_number) | ||
{ | |||
// When touched, say "Heads" with probability 0.5, | |||
// otherwise, say "Tails." | |||
if ( llFrand(1.) < .5) | |||
llSay(0, "Heads"); | |||
else | |||
llSay(0, "Tails"); | |||
} | |||
}</source></nowiki></font><nowiki> | |||
}</ | |func_helpers | ||
|func_helpers | |also | ||
|also | |notes= | ||
|notes= | The random number generator is not a source of entropy. | ||
The random number generator is not a source of entropy. | |||
The sequence of random numbers are shared across the entire process, and not independently seeded. | |||
The sequence of random numbers are shared across the entire process, and not independently seeded. | Therefore, the pseudo random number generation is not suitable for any application which requires | ||
Therefore, the pseudo random number generation is not suitable for any application which requires | completely predictable or completely unpredictable results. | ||
completely predictable or completely unpredictable results. | |cat1=Math | ||
|cat1=Math | |cat2 | ||
|cat2 | |cat3 | ||
|cat3 | }}</nowiki> | ||
}} | |||
</ |
Latest revision as of 21:02, 22 May 2020
LSL Portal | Functions | Events | Types | Operators | Constants | Flow Control | Script Library | Categorized Library | Tutorials |
Articles in this category need examples written for them. To do that set the 'examples' value equal to a multiline string.
Example: llFrand (the order of the parameters in the definition has no effect on the rendering).
{{LSL_Function |sort=Frand |func=llFrand |func_id=8 |func_sleep=0.0 |func_energy=10.0 |p1_type=float |p1_name=mag |p1_desc=Any valid float value |return_type=float |return_text=that is pseudo random number in the range [0.0,mag) or (mag, 0.0]. |spec=returns a pseudo random number in range [0.0, mag) or (mag, 0.0], depending upon the sign of mag. |caveats |examples=<source lang="lsl2">default { touch_start(integer total_number) { // When touched, say "Heads" with probability 0.5, // otherwise, say "Tails." if ( llFrand(1.) < .5) llSay(0, "Heads"); else llSay(0, "Tails"); } }</source> |func_helpers |also |notes= The random number generator is not a source of entropy. The sequence of random numbers are shared across the entire process, and not independently seeded. Therefore, the pseudo random number generation is not suitable for any application which requires completely predictable or completely unpredictable results. |cat1=Math |cat2 |cat3 }}
Pages in category "LSL Needs Example"
The following 46 pages are in this category, out of 647 total.
(previous page) (next page)V
- VEHICLE ANGULAR DEFLECTION EFFICIENCY
- VEHICLE ANGULAR DEFLECTION TIMESCALE
- VEHICLE ANGULAR FRICTION TIMESCALE
- VEHICLE ANGULAR MOTOR DECAY TIMESCALE
- VEHICLE ANGULAR MOTOR DIRECTION
- VEHICLE ANGULAR MOTOR TIMESCALE
- VEHICLE BANKING EFFICIENCY
- VEHICLE BANKING MIX
- VEHICLE BANKING TIMESCALE
- VEHICLE BUOYANCY
- VEHICLE FLAG CAMERA DECOUPLED
- VEHICLE FLAG HOVER GLOBAL HEIGHT
- VEHICLE FLAG HOVER TERRAIN ONLY
- VEHICLE FLAG HOVER UP ONLY
- VEHICLE FLAG HOVER WATER ONLY
- VEHICLE FLAG LIMIT MOTOR UP
- VEHICLE FLAG LIMIT ROLL ONLY
- VEHICLE FLAG MOUSELOOK BANK
- VEHICLE FLAG MOUSELOOK STEER
- VEHICLE FLAG NO DEFLECTION UP
- VEHICLE HOVER EFFICIENCY
- VEHICLE HOVER HEIGHT
- VEHICLE HOVER TIMESCALE
- VEHICLE LINEAR DEFLECTION EFFICIENCY
- VEHICLE LINEAR DEFLECTION TIMESCALE
- VEHICLE LINEAR FRICTION TIMESCALE
- VEHICLE LINEAR MOTOR DECAY TIMESCALE
- VEHICLE LINEAR MOTOR DIRECTION
- VEHICLE LINEAR MOTOR OFFSET
- VEHICLE LINEAR MOTOR TIMESCALE
- VEHICLE TYPE AIRPLANE
- VEHICLE TYPE BALLOON
- VEHICLE TYPE BOAT
- VEHICLE TYPE CAR
- VEHICLE TYPE NONE
- VEHICLE TYPE SLED
- VEHICLE VERTICAL ATTRACTION EFFICIENCY
- VEHICLE VERTICAL ATTRACTION TIMESCALE
- VERTICAL