public bool Equals(DoubleRange other) { return(Begin == other.Begin && End == other.End); }
public DoubleRange Adjust(DoubleRange bounds) { var begin = Math.Max(Math.Min(End, bounds.End) - Length, bounds.Begin); return(new DoubleRange(begin, begin + Math.Min(Length, bounds.Length))); }