Пример #1
0
        public bool overlaps(ref BBox <Numerical> other)
        {
            bool x_overlap = (dynamic)corners[0] <= other.corners[0] ?
                             (dynamic)corners[1] > other.corners[0] :
                             (dynamic)other.corners[1] > corners[0];
            bool y_overlap = (dynamic)corners[2] <= other.corners[2] ?
                             (dynamic)corners[3] > other.corners[2] :
                             (dynamic)other.corners[3] > corners[2];

            return(x_overlap && y_overlap);
        }
Пример #2
0
 public BBox(BBox <Numerical> other)
 {
     Debug.Print($"Copy Constructor use #: {++cpyctor}!");
     // Deep copy
     this.corners = other.corners;
 }