Skip to content

Commit c2fcce4

Browse files
committed
Test the signed distance to orthogonal points.
1 parent 97cbc3c commit c2fcce4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Geometry/Plane/Test.hs

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ prop_signedDistance_identity = property $ do
1717
n <- forAll $ v2 (nonZero coord)
1818
signedDistance v n v === 0
1919

20+
prop_signedDistance_orthogonal = property $ do
21+
v <- forAll $ v2 coord
22+
n <- forAll $ v2 (nonZero coord)
23+
Near (signedDistance v n (v + perp n)) === 0
24+
2025
prop_signedDistance_unit = property $ do
2126
v <- forAll $ v2 coord
2227
n <- signorm <$> forAll (v2 (nonZero coord))

0 commit comments

Comments
 (0)