Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
 
mNo edit summary
 
Line 1: Line 1:
  +
{{#data:Itemtip
−
=math.random and math.randomseed=
 
  +
|name=Earthfury Legguards
  +
|quality=epic
  +
|icon=inv_pants_03
  +
|bind=bop
  +
|slot=Legs
  +
|type=Mail
  +
|armor=455
  +
|stamina=35
  +
|intellect=10
  +
|spirit=28
  +
|shadow=10
  +
|durability=120
  +
|classes=Shaman
  +
|set=The Earthfury
  +
|level=60
  +
|ilvl=66
  +
|sellprice=42336
  +
|itemid=16843
  +
}}
   
  +
This is part of [[The Earthfury]] set, the raid [[Tier 1]] armor set for [[Shaman]]s.
−
==Usage==
 
−
math.randomseed = (int);
 
−
val = math.random([l, u]);
 
   
−
==Description==
+
==Source==
  +
This item drops from [[Magmadar]] in [[Molten Core]].
−
The functions math.random and math.randomseed are interfaces to the simple random generator functions rand and srand that are provided by ANSI C. (No guarantees can be given for their statistical properties.)
 
   
  +
==Patch changes==
−
When called without arguments, math.random returns a pseudo-random real number in the range [0,1).
 
  +
* {{Patch 1.6.0|note=Now has updated art.}}
   
  +
==External links==
−
When called with a number n, math.random returns a pseudo-random integer in the range [1,n].
 
  +
<!-- Read http://www.wowpedia.org/Wowpedia:External_links before posting your links here.
−  
  +
Links that do not conform to the rules will be DELETED.
−
When called with two arguments, l and u, math.random returns a pseudo-random integer in the range [l,u].
 
  +
Repeat violations may result in a BAN.
−  
  +
Have a nice day. :) -->
−
The math.randomseed function sets a "seed" for the pseudo-random generator: Equal seeds produce equal sequences of numbers.
 
  +
{{elinks-item|16843}}
−  
  +
[[Category:World of Warcraft mail legs items]]
−
==Example==
 
  +
[[Category:World of Warcraft epic items]]
−
> local x = math.random();
 
  +
[[Category:Molten Core items]]
−
> = x
 
−
0.34534 (0 - 1)
 
−  
−
> local x = math.random(100);
 
−
> = x
 
−
53 (1 - 100)
 
−  
−
> local x = math.random(50, 52);
 
−
51 (50 - 52)
 
−  
−
==Notes==
 
−
At this stage, I don't know if the range is inclusive or exclusive. [[User:Zingfharn|Zingfharn]]
 
−  
−
One would suppose through deduction that, since random 1 3 will indeed give you numbers other than 2, that the other types of "random" would also give you inclusive results. This is not guaranteed of course, but it seems like the developers would be consistent in their coding.
 

Revision as of 20:23, 25 February 2011

Inv pants 03

This is part of The Earthfury set, the raid Tier 1 armor set for Shamans.

Source

This item drops from Magmadar in Molten Core.

Patch changes

External links