mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 18:10:43 +01:00
59 lines
941 B
XML
59 lines
941 B
XML
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
<root>
|
|
<name>randomSeed()</name>
|
|
|
|
<category>Math</category>
|
|
|
|
<subcategory>Random</subcategory>
|
|
|
|
<usage>Web & Application</usage>
|
|
|
|
<example>
|
|
<image></image>
|
|
<code>
|
|
randomSeed(0);
|
|
for(int i=0; i<100; i++) {
|
|
float r = random(0, 255);
|
|
stroke(r);
|
|
line(i, 0, i, 100);
|
|
}
|
|
|
|
</code>
|
|
</example>
|
|
|
|
<description>
|
|
Sets the seed value for <b>random()</b>. By default, <b>random()</b> produces different results each time the program is run. Set the <b>value</b> parameter to a constant to return the same pseudo-random numbers each time the software is run.
|
|
</description>
|
|
|
|
<syntax>
|
|
random(<c>value</c>);
|
|
</syntax>
|
|
|
|
<parameter>
|
|
<label>value</label>
|
|
<description>int</description>
|
|
</parameter>
|
|
|
|
<returns>None</returns>
|
|
|
|
<related>
|
|
random()
|
|
noise()
|
|
noiseSeed()
|
|
</related>
|
|
|
|
<availability>1.0</availability>
|
|
|
|
<type>Function</type>
|
|
|
|
<partof>Core</partof>
|
|
|
|
|
|
<level>Extended</level>
|
|
|
|
|
|
|
|
|
|
|
|
</root>
|