How to compare custom types
To extend float_eq
functionality over a new type requires implenting the
relevant extension traits.
-
If your type is a struct or tuple struct that consists of fields that already implement the required traits, then you may use a derive macro. See How to derive the traits.
-
If your type cannot have the traits derived for it, of if you do not wish to enable the "derive" feature, see How to manually implement the traits.