tangled
alpha
login
or
join now
m1emi1em.dev
/
aoc2025
1
fork
atom
this repo has no description
1
fork
atom
overview
issues
pulls
pipelines
util.clj: add floor-div
m1emi1em.dev
3 months ago
6f328d28
6e8dde23
+5
1 changed file
expand all
collapse all
unified
split
src
aoc2025
util.clj
+5
src/aoc2025/util.clj
···
136
([t p]
137
(let [tm {:4 adj4 :8 adj8}]
138
(mapv #(vec+ p %) (get tm t)))))
0
0
0
0
0
···
136
([t p]
137
(let [tm {:4 adj4 :8 adj8}]
138
(mapv #(vec+ p %) (get tm t)))))
139
+
140
+
(defn floor-div
141
+
"Divides x by y, flooring and converting result to an int"
142
+
[a b]
143
+
(int (Math/floor (/ a b))))