Click here to make these examples interactive with ClojureScript.
same.ish
Comparing different types for same-ish-ness.
*comparator*
dynamic
The function for comparing individual floats/doubles. Can be overridden using with-comparator or set-comparator!.
Approximate
protocol
Protocol for approximately comparing any types (using *comparator* for floating point parts).
members
ish
(ish this that)
Return true if the two arguments are approximately equal.
default-comparator
The default comparator. Stored in a separate var to make it easier to reset after modifying with set-comparator!