Skip to content

Commit

Permalink
expand on examples to clarify
Browse files Browse the repository at this point in the history
  • Loading branch information
dgtized committed May 29, 2024
1 parent b1f5f07 commit 25c5616
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/shimmers/math/geometry/collisions_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,15 @@
(deftest coincident-segment?
(is (tm/delta= (sut/coincident-segment? [(gv/vec2 0 0) (gv/vec2 0 5)]
[(gv/vec2 0 1) (gv/vec2 0 6)])
(gl/line2 [0 1] [0 5])))
(gl/line2 [0 1] [0 5]))
"coincident overlapping edge")
(is (tm/delta= (sut/coincident-segment? [(gv/vec2 0 0) (gv/vec2 0 5)]
[(gv/vec2 0 5) (gv/vec2 0 6)])
(gl/line2 [0 5] [0 5]))))
(gl/line2 [0 5] [0 5]))
"coincident edge with one connecting vertice")
(is (nil? (sut/coincident-segment? [(gv/vec2 0 0) (gv/vec2 0 5)]
[(gv/vec2 0 5) (gv/vec2 1 5)]))
"touching vertice but edge is not coincident"))

(deftest coincident-edge?
(t/testing "Rect2 Rect2"
Expand Down

0 comments on commit 25c5616

Please sign in to comment.