diff --git a/rand_distr/src/normal.rs b/rand_distr/src/normal.rs index a34e8e40..c3e99010 100644 --- a/rand_distr/src/normal.rs +++ b/rand_distr/src/normal.rs @@ -189,6 +189,16 @@ where F: Float, StandardNormal: Distribution pub fn from_zscore(&self, zscore: F) -> F { self.mean + self.std_dev * zscore } + + /// Returns the mean (`μ`) of the distribution. + pub fn mean(&self) -> F { + self.mean + } + + /// Returns the standard deviation (`σ`) of the distribution. + pub fn std_dev(&self) -> F { + self.std_dev + } } impl Distribution for Normal