Struct dice::Die [] [src]

pub struct Die(_);

A die.

Methods

impl Die
[src]

Returns the smallest possible result of rolling this die.

Returns the largest possible result of rolling this die.

Returns the average result of rolling this die.

Returns all the possible results of rolling this die.

Returns the probabilities of all the possible results of rolling this die.

impl Die
[src]

Constructs a new Die.

Panics

  • size is zero

Returns the size of this die.

Rolls this die and returns the result.

Trait Implementations

impl Copy for Die
[src]

impl Clone for Die
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Die
[src]

Formats the value using the given formatter.

impl PartialEq for Die
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for Die
[src]

impl PartialOrd for Die
[src]

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Ord for Die
[src]

This method returns an Ordering between self and other. Read more

impl Hash for Die
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more