Difference between revisions of "Category:LSL サンプルが必要なもの"

From Second Life Wiki
Jump to navigation Jump to search
(Created page with '{{Multi-lang|Category:LSL XXx|/ja}} {{LSL Header{{#var:lang}}|ml=*}}{{LSLC{{#var:lang}}|}} このカテゴリの中の記事には、例をつける必要があります。例を...')
 
m (色付け)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{Multi-lang|Category:LSL XXx|/ja}}
{{Multi-lang|Category:LSL Needs Example|/ja}}
{{LSL Header{{#var:lang}}|ml=*}}{{LSLC{{#var:lang}}|}}
{{LSL Header{{#var:lang}}|ml=*}}{{LSLC{{#var:lang}}|}}
このカテゴリの中の記事には、例をつける必要があります。例をつけるには、'examples' の値として見えるままの複数行の文字列を設定してください。
このカテゴリの中の記事には、例をつける必要があります。例をつけるには、'examples' の値として見えるままの複数行の文字列を設定してください。


例: [[llFrand]] (定義中のパラメタの順序は、表示に全く影響ありません)
例: [[llFrand]] (定義中のパラメタの順序は、表示に全く影響ありません)
<pre>
<nowiki> {{LSL_Function/ja
{{LSL_Function/ja
|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=<lsl>default
|examples=<lsl>default
{
{
    touch_start(integer total_number)
    touch_start(integer total_number)
    {
    {
        // When touched, say "Heads" with probability 0.5,  
        // When touched, say "Heads" with probability 0.5,  
        // otherwise, say "Tails."
        // otherwise, say "Tails."
        if ( llFrand(1.) < .5)
        if ( llFrand(1.) < .5)
            llSay(0, "Heads");
            llSay(0, "Heads");
        else
        else
            llSay(0, "Tails");
            llSay(0, "Tails");
    }
    }
}</lsl></nowiki></font><nowiki>
}</lsl>
|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>
}}
</pre>

Latest revision as of 16:26, 22 February 2013

このカテゴリの中の記事には、例をつける必要があります。例をつけるには、'examples' の値として見えるままの複数行の文字列を設定してください。

例: llFrand (定義中のパラメタの順序は、表示に全く影響ありません)

 {{LSL_Function/ja
 |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=<lsl>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");
     }
 }</lsl>
 |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
 }}

This category currently contains no pages or media.