 (def asteroid-max-rotation-speed 4)
 (def asteroid-damage 1)
 (def debris-life-millis 3000)
+
+(defn random-int [from to]
+  (let [range (- to from)]
+    (+ from (rand-int range))))
+
+(defn random [from to]
+  (let [range (- to from)]
+    (+ from (rand range))))
+
+(defn vary [variance n]
+  (let [from (* n (- 1 variance))
+        to (* n (+ 1 variance))]
+    (random from to)))
 
 (def ammunition-types {:projectile {:size         (/ ship-size 10)
                                     :shape        [[-1.0 -5.0] [1.0 -5.0] [0.0 1.0]]

              (int \J) {:fire-weapon :launcher}
              (int \K) {:fire-weapon :machinegun}})

; END: constants

(def sqrt (memoize #(Math/sqrt %)))

(defn random [from to]
  (let [range (- to from)]
    (+ from (rand range))))

(defn vary [variance n]
  (let [from (* n (- 1 variance))
        to (* n (+ 1 variance))]
    (random from to)))

(defn get-transformation-matrix [{:keys [size position direction]} scale]
  (let [[x y] position]

  (basic-move asteroid))

(defmethod move :debris [{:keys [life-time size] :as debris}]
  (if (< life-time turn-millis)
    nil
    (let [debris (basic-move debris)
          size (* size (- 1 (/ turn-millis life-time)))
