mirror of
https://github.com/penpot/penpot.git
synced 2026-09-09 13:39:02 +00:00
Add missing divide function to point reladed utils.
This commit is contained in:
parent
38509eea99
commit
c2126b6fe4
@ -86,6 +86,13 @@
|
|||||||
(Point. (* (:x p) (:x other))
|
(Point. (* (:x p) (:x other))
|
||||||
(* (:y p) (:y other)))))
|
(* (:y p) (:y other)))))
|
||||||
|
|
||||||
|
(defn divide
|
||||||
|
[p other]
|
||||||
|
{:pre [(point? p)]}
|
||||||
|
(let [other (-point other)]
|
||||||
|
(Point. (/ (:x p) (:x other))
|
||||||
|
(/ (:y p) (:y other)))))
|
||||||
|
|
||||||
(defn distance
|
(defn distance
|
||||||
"Calculate the distance between two points."
|
"Calculate the distance between two points."
|
||||||
[p other]
|
[p other]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user