コード例 #1
0
 public static bool InRect(this IntPoint p, IntRange xRange, IntRange yRange)
 {
     return(xRange.IsInside(p.X) && yRange.IsInside(p.Y));
 }
コード例 #2
0
ファイル: IntRange.cs プロジェクト: atosorigin/Kinect
 /// <summary>
 /// Check if the specified range overlaps with the range.
 /// </summary>
 /// 
 /// <param name="range">Range to check for overlapping.</param>
 /// 
 /// <returns><b>True</b> if the specified range overlaps with the range or
 /// <b>false</b> otherwise.</returns>
 /// 
 public bool IsOverlapping(IntRange range)
 {
     return ((IsInside(range.min)) || (IsInside(range.max)) ||
             (range.IsInside(min)) || (range.IsInside(max)));
 }
コード例 #3
0
 /// <summary>
 /// Check if the specified range overlaps with the range.
 /// </summary>
 ///
 /// <param name="range">Range to check for overlapping.</param>
 ///
 /// <returns><b>True</b> if the specified range overlaps with the range or
 /// <b>false</b> otherwise.</returns>
 ///
 public bool IsOverlapping(IntRange range)
 {
     return((IsInside(range.min)) || (IsInside(range.max)) ||
            (range.IsInside(min)) || (range.IsInside(max)));
 }