Skip to main content

test_helpers/api/
margin.rs

1// margin.rs : src/api
2
3use crate::{
4    internal::MarginEvaluator,
5    traits::ApproximateEqualityEvaluator,
6};
7
8
9// API functions
10
11/// Creates an [`ApproximateEqualityEvaluator`] that operates by applying
12/// the given `factor` as a margin to determine approximate equality.
13pub fn margin(factor : f64) -> impl ApproximateEqualityEvaluator {
14    MarginEvaluator {
15        factor,
16    }
17}
18
19
20// ///////////////////////////// end of file //////////////////////////// //