示例#1
0
        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);
        }
示例#2
0
 public bool Equals(SomeInterval other)
 {
     return(rational.Equals(other.rational) && cents == other.cents); //!!! compare cents with threshold?
 }