Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Attributes

# RandomNumGen Class Reference

List of all members.

## Public Member Functions
def | __init__
def | choice
def | randint
def | random
def | randrange
def | shuffle
## Static Public Attributes
| notify = \

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | seed
| ) |  |

    seed must be an integer or another RandomNumGen

## Member Function Documentation

def choice | ( |  | self,
|  |  | seq
| ) |  |

    returns a random element from seq

def randint | ( |  | self,
|  |  | a,
|  |  | b
| ) |  |

    returns integer in [a, b]

def random | ( |  | self | ) |

    returns random float in [0.0, 1.0)

def randrange | ( |  | self,
|  |  | start,
|  |  | stop = `None`,
|  |  | step = `1`
| ) |  |

    randrange([start,] stop[, step])
    same as choice(range(start, stop[, step])) without construction
    of a list

def shuffle | ( |  | self,
|  |  | x
| ) |  |

    randomly shuffles x in-place

## Member Data Documentation

notify = \`[static]`

All Classes Namespaces Functions Variables Enumerations Enumerator Properties