Struct rfyl::DiceRolls
[−]
[src]
pub struct DiceRolls { /* fields omitted */ }
Methods
impl DiceRolls
[src]
fn get_result(&self) -> i32
Returns an i32 as the result of the formula including any calculational operators.
fn get_sum_of_rolls(&self) -> i32
Returns an i32 as the simple sum of all rolls.
fn get_rolls_string(&self) -> String
Returns a formatted String showing the dice and the rolled results.
Remarks
From my current experimentation, this appears to be close to ~O(cn). While it doesn't get slow until ludicrous numbers to dice rolls (1 million +), there's probably a better way to do this.
fn get_formula_string_as_rpn(&self) -> String
Returns a postfix formatted String showing the formula.
fn get_formula_string_as_infix(&self) -> String
Returns an infix formatted String showing the formula.
fn get_rolls_formula_string_as_rpn(&self) -> String
Returns a postfix formatted String showing the formula withthe original dice notation instead of the rolled result.
fn get_rolls_formula_string_as_infix(&self) -> String
Returns a infix formatted String showing the formula withthe original dice notation instead of the rolled result.
Trait Implementations
impl Clone for DiceRolls
[src]
fn clone(&self) -> DiceRolls
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more