public override bool IsExisting() { var points = GetPoints(); for (int i = 0; i < points.Length; i++) { var angle = GeometryMath.FindAngle( new LineSegment(points[i], points[(i + 1) % points.Length]), new LineSegment(points[(i + 1) % points.Length], points[(i + 2) % points.Length]) ); if (GeometryMath.IsDoubleEqual(angle, System.Math.PI / 2) == false) { return(false); } } return(true); }