Changeset 885


Ignore:
Timestamp:
06/24/19 14:44:16 (5 years ago)
Author:
Maciej Komosinski
Message:

Added a 2D helper function extensionContaining(const XYRect& r)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/common/2d.h

    r866 r885  
    169169        }
    170170
     171        XYRect extensionContaining(const XYRect& r) const
     172        {
     173                XY<T> p1 = xymin(topLeft(), r.topLeft());
     174                XY<T> p2 = xymax(bottomRight(), r.bottomRight());
     175                return XYRect(p1, p2 - p1);
     176        }
     177
    171178        XYRect translation(const XY<T>& t) const
    172179        {
Note: See TracChangeset for help on using the changeset viewer.