示例#1
0
 public bool Equals(Projection other)
 {
     return Start == other.Start && End == other.End;
 }
示例#2
0
 public bool Overlaps(Projection b, out float distance)
 {
     int order;
     return Overlaps(b, out distance, out order);
 }
示例#3
0
        public bool Overlaps(Projection b, out float distance, out int order)
        {
            var startDistance = Math.Abs(Start - b.End);
            var endDistance = Math.Abs(End - b.Start);

            if (startDistance < endDistance)
            {
                distance = startDistance;
                order = -1;
            }
            else
            {
                distance = endDistance;
                order = 1;
            }

            if (Start > b.End)
                return false;

            if (End < b.Start)
                return false;

            return true;
        }
示例#4
0
        public bool Overlaps(Projection b)
        {
            if (Start > b.End)
                return false;

            if (End < b.Start)
                return false;

            return true;
        }