LuaSTG-x Core API
Public Member Functions
|
List of all members
lstg::Rand Class Reference
Public Member Functions
function
Float
(
local
a,
local
b)
function
GetSeed
()
function
Int
(
local
a,
local
b)
function
Seed
(
local
n)
function
Sign
()
Detailed Description
随机数发生器
Member Function Documentation
◆
Float()
function
Float
(
local
a
,
local
b
)
生成[a,b]范围的随机浮点数
Parameters
a
number
b
number
Returns
number
◆
GetSeed()
function
GetSeed
(
)
获取随机数种子
Returns
number
◆
Int()
function
Int
(
local
a
,
local
b
)
生成[a,b]范围的随机整数
Parameters
a
number
b
number
Returns
number
◆
Seed()
function
Seed
(
local
n
)
设置随机数种子
Parameters
n
number
◆
Sign()
function
Sign
(
)
随机生成1或-1
Returns
number
The documentation for this class was generated from the following file:
lstg/
rand.lua.hpp
lstg
Rand
Generated on Tue Jul 21 2020 18:28:39 for LuaSTG-x Core API by
1.8.18