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
trait SignalEquality[Double]
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def unchanged(next: Double, current: Double): Boolean

true when writing next over current is not a change: the signal keeps current and notifies nobody.

true when writing next over current is not a change: the signal keeps current and notifies nobody.

Attributes