more unit tests need to remove triangle height width

This commit is contained in:
Brady Bodily
2019-10-25 16:44:48 -06:00
parent 557ed0a03c
commit 62c09e84d6
2 changed files with 92 additions and 30 deletions

View File

@@ -26,13 +26,13 @@ namespace Shapes
Lines.Add(new Line(point2, point3));
Lines.Add(new Line(point3, point1));
var centerOfLine3 = (point1 - point3) / 2 + point1;
var centerTriangle = (point1 - centerOfLine3) / 2 + point1;
var centerOfLine1 = (point1 - point2) / 2 + point1;
var centerTriangle = (point1 - centerOfLine1) / 2 + point1;
CenterPoint = centerTriangle;
Height = new Line(point1, centerOfLine3).ComputeLength();
Height = new Line(point1, point3).ComputeLength();
Width = new Line(point1, point2).ComputeLength();
}
@@ -58,6 +58,9 @@ namespace Shapes
var centerOfLine3 = (point1 - point3) / 2 + point1;
var centerTriangle = (point1 - centerOfLine3) / 2 + point1;
Height = new Line(point1, point3).ComputeLength();
Width = new Line(point1, point2).ComputeLength();
CenterPoint = centerTriangle;
}