From fc8a95b194f4acb342f9a5cd3f4124671b654b16 Mon Sep 17 00:00:00 2001 From: hectorLop Date: Thu, 19 Oct 2023 20:26:39 +0200 Subject: [PATCH] Cast percentages --- src/distributions.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/distributions.rs b/src/distributions.rs index 8b2f920..b02ffde 100644 --- a/src/distributions.rs +++ b/src/distributions.rs @@ -18,7 +18,7 @@ pub fn get_distributions() -> HashMap<&'static str, Vec> { let rate: f64 = record[1] .parse() .expect("Failure parsing a return interest into a f64"); - sp500_dist.push(rate); + sp500_dist.push(rate / 100.0); } if let Some(old_value) = distributions.insert("sp500", sp500_dist) { @@ -29,7 +29,7 @@ pub fn get_distributions() -> HashMap<&'static str, Vec> { let rate: f64 = record[1] .parse() .expect("Failure parsing a return interest into a f64"); - msci_world_dist.push(rate); + msci_world_dist.push(rate / 100.0); } if let Some(old_value) = distributions.insert("msci_world", msci_world_dist) {