mirror of
https://github.com/penpot/penpot.git
synced 2026-08-31 17:19:11 +00:00
⚡ Remove reflection on geom matrix code
This commit is contained in:
parent
50aa6ff306
commit
e336f287b6
@ -25,16 +25,7 @@
|
|||||||
|
|
||||||
;; --- Matrix Impl
|
;; --- Matrix Impl
|
||||||
|
|
||||||
(defn format-precision
|
(declare format-precision)
|
||||||
[mtx precision]
|
|
||||||
(when mtx
|
|
||||||
(dm/fmt "matrix(%, %, %, %, %, %)"
|
|
||||||
(mth/to-fixed (.-a mtx) precision)
|
|
||||||
(mth/to-fixed (.-b mtx) precision)
|
|
||||||
(mth/to-fixed (.-c mtx) precision)
|
|
||||||
(mth/to-fixed (.-d mtx) precision)
|
|
||||||
(mth/to-fixed (.-e mtx) precision)
|
|
||||||
(mth/to-fixed (.-f mtx) precision))))
|
|
||||||
|
|
||||||
(cr/defrecord Matrix [^double a
|
(cr/defrecord Matrix [^double a
|
||||||
^double b
|
^double b
|
||||||
@ -46,6 +37,17 @@
|
|||||||
(toString [this]
|
(toString [this]
|
||||||
(format-precision this precision)))
|
(format-precision this precision)))
|
||||||
|
|
||||||
|
(defn format-precision
|
||||||
|
[mtx precision]
|
||||||
|
(when mtx
|
||||||
|
(dm/fmt "matrix(%, %, %, %, %, %)"
|
||||||
|
(mth/to-fixed (.-a ^Matrix mtx) precision)
|
||||||
|
(mth/to-fixed (.-b ^Matrix mtx) precision)
|
||||||
|
(mth/to-fixed (.-c ^Matrix mtx) precision)
|
||||||
|
(mth/to-fixed (.-d ^Matrix mtx) precision)
|
||||||
|
(mth/to-fixed (.-e ^Matrix mtx) precision)
|
||||||
|
(mth/to-fixed (.-f ^Matrix mtx) precision))))
|
||||||
|
|
||||||
(defn matrix?
|
(defn matrix?
|
||||||
"Return true if `v` is Matrix instance."
|
"Return true if `v` is Matrix instance."
|
||||||
[v]
|
[v]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user