mirror of
https://github.com/penpot/penpot.git
synced 2025-02-13 02:28:18 -05:00
🎉 Add proper pprint for matrix and point types.
This commit is contained in:
parent
33c25bfe6d
commit
9d7a814180
2 changed files with 11 additions and 0 deletions
|
@ -9,6 +9,8 @@
|
|||
|
||||
(ns app.common.geom.matrix
|
||||
(:require
|
||||
#?(:cljs [cljs.pprint :as pp]
|
||||
:clj [clojure.pprint :as pp])
|
||||
[app.common.math :as mth]
|
||||
[app.common.geom.point :as gpt]))
|
||||
|
||||
|
@ -130,3 +132,5 @@
|
|||
(th-eq m1d m2d)
|
||||
(th-eq m1e m2e)
|
||||
(th-eq m1f m2f))))
|
||||
|
||||
(defmethod pp/simple-dispatch Matrix [obj] (pr obj))
|
||||
|
|
|
@ -10,6 +10,8 @@
|
|||
(ns app.common.geom.point
|
||||
(:refer-clojure :exclude [divide min max])
|
||||
(:require
|
||||
#?(:cljs [cljs.pprint :as pp]
|
||||
:clj [clojure.pprint :as pp])
|
||||
#?(:cljs [cljs.core :as c]
|
||||
:clj [clojure.core :as c])
|
||||
[app.common.math :as mth]))
|
||||
|
@ -245,3 +247,8 @@
|
|||
(- (* y2 x1))))
|
||||
dist (distance line-point2 line-point1)]
|
||||
(/ num dist)))
|
||||
|
||||
|
||||
;; --- Debug
|
||||
|
||||
(defmethod pp/simple-dispatch Point [obj] (pr obj))
|
||||
|
|
Loading…
Add table
Reference in a new issue