public void Polygon_DoesContainPointAlongSides() { //think messes up due to percision error List<LineSegment> lineSegments = new List<LineSegment>(); lineSegments.Add(new LineSegment(Point.MakePointWithInches(0, 2, 3), Point.MakePointWithInches(-3, -2, 0))); lineSegments.Add(new LineSegment(Point.MakePointWithInches(-3, -2, 0), Point.MakePointWithInches(1, 1, -1))); lineSegments.Add(new LineSegment(Point.MakePointWithInches(1, 1, -1), Point.MakePointWithInches(0, 2, 3))); Polygon testPolygon = new Polygon(lineSegments); Point pointOn = Point.MakePointWithInches(-1.5, 0, 1.5); Point anotherPointOn = Point.MakePointWithInches(.5, 1.5, 1); Point pointNotOn = Point.MakePointWithInches(-2, 0, 1.5); bool resultOn = testPolygon.DoesContainPointAlongSides(pointOn); bool resultAnotherOn = testPolygon.DoesContainPointAlongSides(anotherPointOn); bool resultNotOn = testPolygon.DoesContainPointAlongSides(pointNotOn); resultOn.Should().BeTrue(); resultAnotherOn.Should().BeTrue(); resultNotOn.Should().BeFalse(); }