                   dir (map #(/ % mag) dir)]
               (map + a
                    (if (> mag 0)
-                     (map #(* % (/ gravity-multiplier (* mag mag))) dir)
+                     (map #(* % (/ gravity-multiplier
+                                   (* mag mag))) dir)
                      [0 0 0]))))
           [0 0 0]
           all))

            abdir (map - (:pos pa) (:pos pb))
            dist (magnitude abdir)
            abdir (map #(/ % dist) abdir)
            bounce (map #(* % (- 20 dist)) abdir)]
        (when (and (not= a b) (collided? (:pos pa) (:pos pb)))
          (do
            (reset! particles (assoc @particles a (assoc pa :pos (map + (:pos pa) bounce) :vel (map + (:vel pa) (map #(* % (magnitude (:vel pa))) abdir)))))


(defn collided?
  [a b]
  (< (magnitude (map - a b)) particle-diameter))

(defn handle-collisions!
  []
