mirror of
https://github.com/penpot/penpot.git
synced 2026-02-12 22:53:02 +00:00
⚡ Remove reflection on geom matrix code
This commit is contained in:
@@ -25,16 +25,7 @@
|
||||
|
||||
;; --- Matrix Impl
|
||||
|
||||
(defn 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))))
|
||||
(declare format-precision)
|
||||
|
||||
(cr/defrecord Matrix [^double a
|
||||
^double b
|
||||
@@ -46,6 +37,17 @@
|
||||
(toString [this]
|
||||
(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?
|
||||
"Return true if `v` is Matrix instance."
|
||||
[v]
|
||||
|
||||
Reference in New Issue
Block a user