            (* cycle)
            (- value)))))
 
-;;
 ;; ### Statistics
 ;;
 ;; Whole code is taken from public GIST: https://gist.github.com/scottdw/2960070

(set! *warn-on-reflection* true)
(set! *unchecked-math* true)

;; Bunch of math constants
(def ^:const ^double PI Math/PI)
(def ^:const ^double HALF_PI (/ PI 2.0))
(def ^:const ^double QUARTER_PI (/ PI 4.0))

         (+ mn (next-random-value-long r diff))))))

(defn next-random-value-double
  "Generate next double.

  * arity 0 - from 0 to 1 (exluded)
  * arity 1 - from 0 to provided double (excluded)
  * arity 2 - from the provided range (included, excluded)"
  (^double [^RandomGenerator r] (.nextDouble r))
  (^double [^RandomGenerator r ^double mx] (* (.nextDouble r) mx))
  (^double [r ^double mn ^double mx]
