fix step/resolution logic and fix accuracy issues
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user