Switch to approx

This commit is contained in:
Rico Riedel 2022-08-06 21:55:37 +02:00
parent f8dd56ccb6
commit 3fcab89c51
No known key found for this signature in database
GPG Key ID: 75AC868575DE7B18
2 changed files with 4 additions and 4 deletions

View File

@ -123,7 +123,7 @@ mod test {
let sampler = SegmentsFactory::new(Box::new(child), 4.0).create(&Config::default());
assert_eq!(0.96, sampler.sample(Vector::default()));
assert_abs_diff_eq!(0.96, sampler.sample(Vector::default()));
}
#[test]

View File

@ -55,8 +55,8 @@ mod test {
#[test]
fn new() {
let v = Vector::new(4.0, 7.0);
assert_eq!(4.0, v.x);
assert_eq!(7.0, v.y);
assert_abs_diff_eq!(4.0, v.x);
assert_abs_diff_eq!(7.0, v.y);
}
#[test]
@ -71,7 +71,7 @@ mod test {
#[test]
fn sum() {
assert_eq!(11.0, Vector::new(3.0, 8.0).sum());
assert_abs_diff_eq!(11.0, Vector::new(3.0, 8.0).sum());
}
#[test]