/// <summary> /// Determines whether this range overlaps with the given range. /// See <see cref="Int64Utils.DoRangesOverlap"/> for more information. /// </summary> /// <param name="other"> /// The range to check. /// </param> /// <returns> /// <c>true</c> if this instance overlaps with <paramref name="other"/>; /// <c>false</c> otherwise. /// </returns> public bool Overlaps(Int64Range other) { return(Int64Utils.DoRangesOverlap(this.begin, this.end, other.begin, other.end)); }
/// <summary> /// Determines whether this instance intersects with /// the given instance. /// <para/> /// Does [this.startTime, this.endTime) intersect with [other.startTime, other.endTime) /// </summary> /// <param name="other"> /// The range to check against. /// </param> /// <returns> /// <c>true</c> if the ranges intersect; <c>false</c> otherwise. /// </returns> public bool IntersectsWith(TimeRange other) { return(Int64Utils.DoRangesOverlap(this.startTime.ToNanoseconds, this.endTime.ToNanoseconds, other.startTime.ToNanoseconds, other.endTime.ToNanoseconds)); }