(ns same.klipse (:require-macros [same :refer [with-comparator]]) (:require [same :refer [ish? zeroish? not-zeroish? set-comparator!]] [same.compare :refer [compare-ulp]] [same.ish :refer [default-comparator]]))

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!