A crate that disapeared was probably providing the
used trait.
Switch the transparency comparison code to use:
https://docs.rs/float-cmp/0.9.0/float_cmp/.
Given I a not a graphic programmer the patch uses
value that seems meaningfull according to the doc
of the float_cmp crate.
Excerpt from the documentation:
"""For most cases, I recommend you use a smallish
integer for the ulps parameter (1 to 5 or so),
and a similar small multiple of the floating point’s
EPSILON constant (1.0 to 5.0 or so), but there are
plenty of cases where this is insufficient."""
Signed-off-by: Benoît Canet <benoit@nodalink.com>
Sixtyfps uses euclid already, so let's use euclid for float comparisons
as well.
I changed the code to decide whether a number is a positive integer to
make do without a comparison along the way.