From e336f287b6f637549705d5ae5e5952ca3880ce77 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 14 Aug 2025 09:05:55 +0200 Subject: [PATCH] :zap: Remove reflection on geom matrix code --- common/src/app/common/geom/matrix.cljc | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/common/src/app/common/geom/matrix.cljc b/common/src/app/common/geom/matrix.cljc index 954c13ccca..63195b1bb5 100644 --- a/common/src/app/common/geom/matrix.cljc +++ b/common/src/app/common/geom/matrix.cljc @@ -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]