private void FindParameters(out double height, out double width) { var pts = GetPoints(); height = GeometryMath.FindMagnitude(new LineSegment(pts[0], pts[1])); width = GeometryMath.FindMagnitude(new LineSegment(pts[1], pts[2])); }
public override bool IsExisting() { var lines = GetLines(); var a = GeometryMath.FindMagnitude(lines[0]); var b = GeometryMath.FindMagnitude(lines[1]); var c = GeometryMath.FindMagnitude(lines[2]); return(a + b > c && a + c > b && b + c > a); }
public override double FindArea() { var lines = GetLines(); var p = FindPerimeter() / 2; var a = GeometryMath.FindMagnitude(lines[0]); var b = GeometryMath.FindMagnitude(lines[1]); var c = GeometryMath.FindMagnitude(lines[2]); return(System.Math.Sqrt(p * (p - a) * (p - b) * (p - c))); }