# src/main/clojure/clojurecheck/core.clj

- (-> (- a b) (mod 180)~~ Math/abs~~))

+ (-> (- a b) Math/abs (mod 180)))

(deftest angular-diff-standard-test

(deftest angular-diff-property

(cc/property „angular-diff is smallest angel between a and b“

- [diff (cc/float :lower -180.0 :upper 180.0)

- a (cc/float :lower 0.0 :upper 360.0)

+ diff (cc/int :lower -180 :upper 180)]

(let [b (+ a (* 360 n) diff)]

(is (= (angular-diff a b) (Math/abs diff))))))

+ my.package=> (run-tests)

- FAIL in (angular-diff-property) (core.clj:288)

- falsified angular-diff is smallest angel between a and b in 3 attempts

+ FAIL in (angular-diff-property) (core.clj:305)

+ falsified 'angular-diff is smallest angel between a and b' in 5 attempts

- diff = 1.3374370509881066

expected: (= (angular-diff a b) (Math/abs diff))

- actual: (not (= 17~~8.66256294901189 1.3374370509881066~~))

+ actual: (not (= 177 3))

Ran 2 tests containing 7 assertions.