public static SomeInterval Parse(string text) { var t = new SomeInterval(); t.rational = Rational.Parse(text); if (t.rational.IsDefault()) { if (!float.TryParse(text.TrimEnd('c'), out t.cents)) { return(null); } } return(t); }
public bool Equals(SomeInterval other) { return(rational.Equals(other.rational) && cents == other.cents); //!!! compare cents with threshold? }