library: material: uniform: fix float comparison

This commit is contained in:
Bruno BELANYI 2020-03-18 14:34:37 +01:00
parent 76db818fa8
commit 9dcce9218f

View file

@ -83,6 +83,6 @@ mod test {
#[test]
fn reflectivity_works() {
let mat = simple_material();
assert_eq!(mat.reflectivity(Point2D::origin()), 0.5)
assert!(mat.reflectivity(Point2D::origin()) - 0.5 < std::f32::EPSILON)
}
}