Example #1
0
 public int CompareTo([AllowNull] KahanRunningSum other)
 {
     if (other is null)
     {
         return(-1);
     }
     return(this.CompareTo(other.Value));
 }
Example #2
0
 public override bool Equals(object obj)
 {
     if (Object.ReferenceEquals(this, obj))
     {
         return(true);
     }
     if (obj is KahanRunningSum)
     {
         KahanRunningSum other = obj as KahanRunningSum;
         return(this.Value == other.Value);
     }
     if (obj is double)
     {
         return(this.Value == (double)obj);
     }
     return(base.Equals(obj));
 }