MCPcopy Create free account
hub / github.com/TheAlgorithms/Go / TestIsParallel

Function TestIsParallel

math/geometry/straightlines_test.go:46–52  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

44}
45
46func TestIsParallel(t *testing.T) {
47 l1 := Line{P1: Point{1, 2}, P2: Point{2, 4}}
48 l2 := Line{P1: Point{25, 50}, P2: Point{50, 100}}
49 if !IsParallel(&l1, &l2) {
50 t.Fatalf("Failed to check if Parallel.")
51 }
52}
53
54func TestIsPerpendicular(t *testing.T) {
55 l1 := Line{P1: Point{1, 2}, P2: Point{2, 4}}

Callers

nothing calls this directly

Calls 1

IsParallelFunction · 0.85

Tested by

no test coverage detected