internal string ToHtml()
 {
     if (IsInfinityInterval)
     {
         if (WichSide)
         {
             return($"(-∞ {Border.ToHTML()}{(BorderIsIncluded ? "]" : ")")}");
         }
         else
         {
             return($"{(BorderIsIncluded ? "[" : "(")}{Border.ToHTML()} +∞)");
         }
     }
     else
     {
         if (LeftBorder.Equals(RightBorder) && LeftIsIncluded && RightIsIncluded)
         {
             return($"{{{LeftBorder.ToHTML()}}}");
         }
         else
         {
             return($"{(LeftIsIncluded ? "[" : "(")}{LeftBorder.ToHTML()} {RightBorder.ToHTML()}{(RightIsIncluded ? "]" : ")")}");
         }
     }
 }
 public override string ToString()
 {
     if (IsInfinityInterval)
     {
         if (WichSide)
         {
             return($"(-inf {Border}{(BorderIsIncluded ? "]" : ")")}");
         }
         else
         {
             return($"{(BorderIsIncluded ? "[" : "(")}{Border} +inf)");
         }
     }
     else
     {
         if (LeftBorder.Equals(RightBorder) && LeftIsIncluded && RightIsIncluded)
         {
             return($"{{{LeftBorder}}}");
         }
         else
         {
             return($"{(LeftIsIncluded ? "[" : "(")}{LeftBorder} {RightBorder}{(RightIsIncluded ? "]" : ")")}");
         }
     }
 }
Ejemplo n.º 3
0
 protected bool Equals(Period other)
 {
     return(LeftBorder.Equals(other.LeftBorder) && RightBorder.Equals(other.RightBorder));
 }