public void Line_IsPerpendicularTo() { Line line1 = new LineSegment(Point.Origin, new Direction(Angle.RightAngle / 2), new Distance(new Inch(), 1)); Line line2 = new LineSegment(Point.Origin, new Direction(new Angle(new Degree(), 135)), new Distance(new Inch(), 1)); Line line3 = new LineSegment(Point.MakePointWithInches(2,-3,1), new Direction(Angle.RightAngle / 2, Angle.ZeroAngle), new Distance(new Inch(), 1)); Line line4 = new LineSegment(Point.MakePointWithInches(3, 5, 7)); Line line5 = new LineSegment(Point.MakePointWithInches(1, -2, 1)); Line line6 = new LineSegment(Point.MakePointWithInches(1, 2, -3), Point.MakePointWithInches(5, 1, -4)); //4, -1, -1 line1.IsPerpendicularTo(line2).Should().BeTrue(); line1.IsPerpendicularTo(line3).Should().BeTrue(); line2.IsPerpendicularTo(line3).Should().BeTrue(); line3.IsPerpendicularTo(line1).Should().BeTrue(); //check its symmetric line4.IsPerpendicularTo(line5).Should().BeTrue(); line4.IsPerpendicularTo(line6).Should().BeTrue(); line5.IsPerpendicularTo(line6).Should().BeFalse(); line6.IsPerpendicularTo(line4).Should().BeTrue(); //check its symmetric line1.IsPerpendicularTo(line4).Should().BeFalse(); }