Merge remote-tracking branch 'origin/staging' into develop

This commit is contained in:
Alejandro Alonso 2022-09-26 15:56:21 +02:00
commit c3f0657652
26 changed files with 143 additions and 97 deletions

View file

@ -14,7 +14,7 @@
[app.common.spec :as us]
[clojure.spec.alpha :as s]))
(def precision 3)
(def precision 6)
;; --- Matrix Impl

View file

@ -11,8 +11,9 @@
#?(:cljs [app.common.uuid-impl :as impl])
#?(:cljs [cljs.core :as c]))
#?(:clj (:import
app.common.UUIDv8
java.util.UUID
app.common.UUIDv8)))
java.nio.ByteBuffer)))
(def zero #uuid "00000000-0000-0000-0000-000000000000")
@ -50,3 +51,11 @@
(defn get-word-low
[id]
(.getLeastSignificantBits ^UUID id)))
#?(:clj
(defn get-bytes
[^UUID o]
(let [buf (ByteBuffer/allocate 16)]
(.putLong buf (.getMostSignificantBits o))
(.putLong buf (.getLeastSignificantBits o))
(.array buf))))