mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add missing divide function to point reladed utils.
This commit is contained in:
parent
38509eea99
commit
c2126b6fe4
1 changed files with 7 additions and 0 deletions
|
@ -86,6 +86,13 @@
|
|||
(Point. (* (:x p) (:x 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
|
||||
"Calculate the distance between two points."
|
||||
[p other]
|
||||
|
|
Loading…
Add table
Reference in a new issue