public int CompareTo([AllowNull] KahanRunningSum other) { if (other is null) { return(-1); } return(this.CompareTo(other.Value)); }
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)); }