pub fn average(&self) -> f64 {
        match self {
            DiceTerm::Dice { count, sides } => (*count as f64) * (*sides as f64 + 1.0) / 2.0,
            DiceTerm::Constant(constant) => *constant as f64
        }
    }
/// Returns the expected average value of this term.
Returns the expected average value of this term.
Returns the expected average value of this term .
pub fn average(&self) -> f64 {
        match self {
            DiceTerm::Dice { count, sides } => (*count as f64) * (*sides as f64 + 1.0) / 2.0,
            DiceTerm::Constant(constant) => *constant as f64
        }
    }
pub fn average ( & self ) -> f64 { match self { DiceTerm :: Dice { count , sides } => ( * count as f64 ) * ( * sides as f64 + 1.0 ) / 2.0 , DiceTerm :: Constant ( constant ) => * constant as f64 } }
Returns the expected average value of this term.
Returns the expected average value of this term .
&self
&self