Skip to content

Commit

Permalink
change comparison to be floating point compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
AlpMimaroglu committed Jan 8, 2025
1 parent 862e316 commit f5e44bb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/solvers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ pub trait SolverModel {
/// .with_all([constraint!(x >= 1), constraint!(x <= 10)])
/// .solve()
/// .expect("example model, trivial to solve"); //
/// assert_eq!(result.eval(&x), 10.);
/// assert!((result.eval(&x) - 10.).abs() <= f64::EPSILON);
/// ```
fn with_all(mut self, constraints: impl IntoIterator<Item = Constraint>) -> Self
where
Expand Down

0 comments on commit f5e44bb

Please # to comment.