TONS of refactoring

This commit is contained in:
Simon Gardling
2022-03-23 13:41:52 -04:00
parent 5f2fdce026
commit cd8cb6b587
4 changed files with 177 additions and 234 deletions

View File

@@ -229,7 +229,7 @@ pub fn newtons_method(
// Returns a vector of length `max_i` starting at value `min_x` with resolution
// of `resolution`
pub fn resolution_helper(max_i: usize, min_x: f64, resolution: f64) -> Vec<f64> {
(0..max_i)
(0..=max_i)
.map(|x| (x as f64 / resolution as f64) + min_x)
.collect()
}