Skip to content

Commit

Permalink
prefer math/floor to Math/floor
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed May 18, 2024
1 parent a08d074 commit 753de01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/shimmers/algorithm/delaunator.cljs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns shimmers.algorithm.delaunator
(:require
["delaunator"]
[clojure.math :as math]
[thi.ng.geom.polygon :as gp]
[thi.ng.geom.triangle :as gt]
[thi.ng.geom.vector :as gv]))
Expand Down Expand Up @@ -63,7 +64,7 @@
(* cd (- bx ax)))))))

(defn triangle-of-edge [e]
(Math/floor (/ e 3)))
(math/floor (/ e 3)))

(defn triangle-center [points ^js/Delaunator delaunay t]
(let [{[a b c] :points} (delaunay-triangle points delaunay t)]
Expand Down
3 changes: 2 additions & 1 deletion src/shimmers/sketches/decorative_tiles.cljs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
(ns shimmers.sketches.decorative-tiles
(:require
[clojure.math :as math]
[shimmers.common.palette :as palette]
[shimmers.common.svg :as csvg :include-macros true]
[shimmers.common.ui.controls :as ctrl]
Expand Down Expand Up @@ -120,7 +121,7 @@
:bounds (g/bounds s)})

(defn mirror [n i]
(let [mid (Math/floor (/ n 2))]
(let [mid (math/floor (/ n 2))]
(if (even? n)
(cond (< i mid) (- (dec mid) i)
:else (- i mid))
Expand Down

0 comments on commit 753de01

Please sign in to comment.