Closed epage closed 6 years ago
This isn't needed for any of my cases but just wanted to bring it up for rounding things out.
Floating point equality is weird. Generally, its best to do a "closeness" check.
Hamcrest seems to have this https://github.com/ujh/hamcrest-rust/blob/master/src/matchers/close_to.rs
float_cmp might be useful for this https://mikedilger.github.io/float-cmp/float_cmp/index.html
float_cmp
See also
This isn't needed for any of my cases but just wanted to bring it up for rounding things out.
Floating point equality is weird. Generally, its best to do a "closeness" check.