示例#1
0
文件: Line.cs 项目: lukianol/CCI
        public override bool Equals(object obj)
        {
            Line line = (Line)obj;

            if ((IsDoubleEqual(line.Slope.GetValueOrDefault(), Slope.GetValueOrDefault())) &&
                (IsDoubleEqual(line.Intercept, Intercept)))
            {
                return(true);
            }

            return(false);
        }
示例#2
0
文件: Line.cs 项目: lukianol/CCI
 public override int GetHashCode()
 {
     return((int)(Slope.GetValueOrDefault() * 1000) | (int)(Intercept * 1000));
 }