doubleTotalOrder
io.worxbend.tui.runtime.SignalEquality.doubleTotalOrder
object doubleTotalOrder extends SignalEquality[Double]
Double compares by IEEE-754 total order rather than ==.
== gets both floating-point edges wrong for a change flag: -0.0 == 0.0 is true, so a sign flip that carries direction (a scroll or velocity delta) would be silently dropped, and NaN == NaN is false, so re-setting NaN would notify on every write and repaint forever. compare distinguishes the zeros and treats NaN as itself.
Attributes
- Graph
-
- Supertypes
- Self type
-
doubleTotalOrder.type
Members list
In this article