class ProjectionRect {

  public static ProjectionRect intersect(ProjectionRect src1, ProjectionRect src2) {
    double x1 = Math.max(src1.getMinX(), src2.getMinX());
    double y1 = Math.max(src1.getMinY(), src2.getMinY());
    double x2 = Math.min(src1.getMaxX(), src2.getMaxX());
    double y2 = Math.min(src1.getMaxY(), src2.getMaxY());
    return builder().setX(x1).setY(y1).setWidth(x2 - x1).setHeight(y2 - y1).build();
  }

  public  ProjectionRect();
  public  ProjectionRect(ProjectionPoint corner1, ProjectionPoint corner2);
  public  ProjectionRect(ProjectionPoint minimum, double width, double height);
  public  ProjectionRect(double x1, double y1, double x2, double y2);
  public  ProjectionRect(String spec);
  private  ProjectionRect(ProjectionRect.Builder builder);

}