Skip to content

Commit 0c45537

Browse files
committed
distance point-line test
1 parent bce205d commit 0c45537

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/test/kotlin/glm_/testCoreFuncGeometric.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,16 @@ class testCoreFuncGeometric : StringSpec() {
3737
(glm.abs(distance4) < Float.MIN_VALUE) shouldBe true
3838
}
3939

40+
"distance point line" {
41+
42+
val point = Vec3(0, 1, 0)
43+
val lineA = Vec3()
44+
val lineB = Vec3(0, 0, 1)
45+
val distance = glm.distance(point, lineA, lineB)
46+
47+
distance shouldBe 1f
48+
}
49+
4050
"dot" {
4151

4252
val dot1 = glm.dot(Vec1(1), Vec1(1))

0 commit comments

Comments
 (0)