fix step/resolution logic and fix accuracy issues

This commit is contained in:
Simon Gardling
2022-05-16 10:53:17 -04:00
parent bee782035e
commit 73cb36cb50
4 changed files with 4 additions and 28 deletions

View File

@@ -48,22 +48,6 @@ fn stepped_vector() {
// }
/// Tests [`resolution_helper`] to make sure it returns expected output
#[test]
fn resolution_helper() {
use ytbn_graphing_software::resolution_helper;
assert_eq!(
resolution_helper(10, &1.0, &1.0),
vec![1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0]
);
assert_eq!(
resolution_helper(5, &-2.0, &1.0),
vec![-2.0, -1.0, 0.0, 1.0, 2.0]
);
assert_eq!(resolution_helper(3, &-2.0, &1.0), vec![-2.0, -1.0, 0.0]);
}
#[test]
fn step_helper() {