Vega strike Python Modules doc
0.5.1
Documentation of the " Modules " folder of Vega strike
|
Public Member Functions | |
def | __init__ |
def | seed |
def | random |
def | uniform |
def | randint |
def | choice |
def | randrange |
Definition at line 40 of file whrandom.py.
def __init__ | ( | self, | |
x = 0 , |
|||
y = 0 , |
|||
z = 0 |
|||
) |
Initialize an instance. Without arguments, initialize from current time. With arguments (x, y, z), initialize from them.
Definition at line 41 of file whrandom.py.
References whrandom.seed().
def choice | ( | self, | |
seq | |||
) |
Choose a random element from a non-empty sequence.
Definition at line 91 of file whrandom.py.
References whrandom.random().
def randint | ( | self, | |
a, | |||
b | |||
) |
Get a random integer in the range [a, b] including both end points. (Deprecated; use randrange below.)
Definition at line 84 of file whrandom.py.
References whrandom.randrange().
def random | ( | self) |
Get the next random number in the range [0.0, 1.0).
Definition at line 65 of file whrandom.py.
References whrandom._seed.
def randrange | ( | self, | |
start, | |||
stop = None , |
|||
step = 1 , |
|||
int = int , |
|||
default = None |
|||
) |
Choose a random item from range(start, stop[, step]). This fixes the problem with randint() which includes the endpoint; in Python this is usually not what you want. Do not supply the 'int' and 'default' arguments.
Definition at line 95 of file whrandom.py.
References whrandom.random().
def seed | ( | self, | |
x = 0 , |
|||
y = 0 , |
|||
z = 0 |
|||
) |
Set the seed from (x, y, z). These must be integers in the range [0, 256).
Definition at line 47 of file whrandom.py.
References whrandom._seed.
def uniform | ( | self, | |
a, | |||
b | |||
) |
Get a random number in the range [a, b).
Definition at line 80 of file whrandom.py.
References whrandom.random().