distance.
This commit is contained in:
@@ -44,6 +44,12 @@
|
||||
range (+ (* percent-complete (- maximum-size minimum-size)) minimum-size)]
|
||||
range)))))
|
||||
|
||||
(defn dist [x1 y1 x2 y2]
|
||||
(let [dx (- x1 x2)
|
||||
dy (- y1 y2)]
|
||||
(Math/sqrt (+ (* dx dx) (* dy dy)))))
|
||||
|
||||
|
||||
(defn flip [anim]
|
||||
(animation (animation! anim :get-frame-duration)
|
||||
(for [src-frame (animation! anim :get-key-frames)
|
||||
|
||||
Reference in New Issue
Block a user