Files
luaj/src/test/res/mathlib.lua

27 lines
767 B
Lua
Raw Normal View History

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) )