code: @Nonnull
    @CheckReturnValue
    public SizeDouble getBestMatchingSize (@Nonnegative final double dMaxWidth, @Nonnegative final double dMaxHeight)
    {
      ValueEnforcer.isGT0 (dMaxWidth, "MaxWidth");
      ValueEnforcer.isGT0 (dMaxHeight, "MaxHeight");
  
      final double dRelWidth = m_dWidth / dMaxWidth;
      final double dRelHeight = m_dHeight / dMaxHeight;
      if (dRelWidth > dRelHeight)
      {
        if (m_dWidth > dMaxWidth)
          return new SizeDouble (dMaxWidth, m_dHeight / dRelWidth);
      }
      else
      {
        if (m_dHeight > dMaxHeight)
          return new SizeDouble (m_dWidth / dRelHeight, dMaxHeight);
      }
      return this;
    }
docs: Return the scaled width and height relative to a maximum size.
  
  @param dMaxWidth
  Maximum width. Must be &gt; 0.
  @param dMaxHeight
  Maximum height. Must be &gt; 0.
  @return An array with 2 elements, where the first element is the width, and
  the second is the height.