From b4ec09c9afc343970d1df5e9afd6f506d66894d4 Mon Sep 17 00:00:00 2001 From: chaos Date: Thu, 21 Nov 2024 09:59:18 +0000 Subject: [PATCH] update --- journal/src/helpers.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/journal/src/helpers.rs b/journal/src/helpers.rs index 367079a..d94ff19 100644 --- a/journal/src/helpers.rs +++ b/journal/src/helpers.rs @@ -1,25 +1,5 @@ use crate::types::{CustomUnitIngestionDose, StandardIngestionDose}; -pub fn calculate_standard_deviation( - expectation_x: f64, - standard_deviation_x: f64, - expectation_y: f64, - standard_deviation_y: f64, -) -> Option { - let sum_x = standard_deviation_x.powi(2) + expectation_x.powi(2); - let sum_y = standard_deviation_y.powi(2) + expectation_y.powi(2); - - let expectations = expectation_x.powi(2) * expectation_y.powi(2); - - let product_variance = (sum_x * sum_y) - expectations; - println!("{} {} {} {}", sum_x, sum_y, expectations, product_variance); - if product_variance > 0.0000001 { - Some((product_variance.sqrt() * 100.0).round() / 100.0) - } else { - None - } -} - pub fn calulate_custom_unit_ingestion_dose( dose: &CustomUnitIngestionDose, custom_unit_dose: &CustomUnitIngestionDose,