added tests for rectangle intersection
This commit is contained in:
+1
-1
@@ -62,7 +62,7 @@ func TestLineIntersection(t *testing.T) {
|
||||
{[]line{line{Point{5, 8}, Point{8, 5}}, line{Point{3, 7}, Point{7, 3}}}, Point{0, 0}},
|
||||
}
|
||||
for _, rt := range lineIntersectionTest {
|
||||
actual := lineIntersection(rt.l[0], rt.l[1])
|
||||
actual, _ := lineIntersection(rt.l[0], rt.l[1])
|
||||
if actual != rt.expected {
|
||||
t.Errorf(
|
||||
"failed spiral:\n\texpected: %f\n\t actual: %f",
|
||||
|
||||
Reference in New Issue
Block a user