Add math.random() and math.randomseed()

This commit is contained in:
James Roseborough
2007-12-08 01:42:51 +00:00
parent 215134feb5
commit 1923d8e6a0
2 changed files with 68 additions and 10 deletions

View File

@@ -2,3 +2,25 @@ print( math.sin( 0.0 ) )
print( math.cos( math.pi ) )
print( math.sqrt( 9.0 ) )
print( math.modf( 5.25 ) )
print( math.random(5,10) )
print( math.random(5,10) )
print( math.random(5,10) )
print( math.random(5,10) )
print( math.random() )
print( math.random() )
print( math.random() )
print( math.random() )
print( math.randomseed(20), math.random() )
print( math.randomseed(20), math.random() )
print( math.randomseed(20), math.random() )
print( math.randomseed(30), math.random() )
print( math.randomseed(30), math.random() )
print( math.random(30) )
print( math.random(30) )
print( math.random(30) )
print( math.random(30) )
print( math.random(-4,-2) )
print( math.random(-4,-2) )
print( math.random(-4,-2) )
print( math.random(-4,-2) )
print( math.random(-4,-2) )