mirror of
https://github.com/ricoriedel/wipe.git
synced 2024-11-22 16:06:38 +00:00
Switch to approx
This commit is contained in:
parent
f8dd56ccb6
commit
3fcab89c51
@ -123,7 +123,7 @@ mod test {
|
|||||||
|
|
||||||
let sampler = SegmentsFactory::new(Box::new(child), 4.0).create(&Config::default());
|
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]
|
#[test]
|
||||||
|
@ -55,8 +55,8 @@ mod test {
|
|||||||
#[test]
|
#[test]
|
||||||
fn new() {
|
fn new() {
|
||||||
let v = Vector::new(4.0, 7.0);
|
let v = Vector::new(4.0, 7.0);
|
||||||
assert_eq!(4.0, v.x);
|
assert_abs_diff_eq!(4.0, v.x);
|
||||||
assert_eq!(7.0, v.y);
|
assert_abs_diff_eq!(7.0, v.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@ -71,7 +71,7 @@ mod test {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn sum() {
|
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]
|
#[test]
|
||||||
|
Loading…
Reference in New Issue
Block a user