mscore::algorithm::isotope

Function normal_pdf

Source
pub fn normal_pdf(x: f64, mean: f64, std_dev: f64) -> f64
Expand description

calculate the normal probability density function

Arguments:

  • x - value to calculate the probability density function of
  • mean - mean of the normal distribution
  • std_dev - standard deviation of the normal distribution

Returns:

  • f64 - probability density function of x

ยงExamples

use mscore::algorithm::isotope::normal_pdf;

let pdf = normal_pdf(0.0, 0.0, 1.0);
assert_eq!(pdf, 0.39894228040143265);