public final function expandMaxSideTo2( int $newLandscapeMaxWidth, int $newPortraitMaxHeight ) : bool
   {

      $this->triggerFixedErrorByNeed( 'expandMaxSideTo2' );

      if ( $this->isPortrait() )
      {

         if ( $newPortraitMaxHeight <= $this->_height )
         {
            return false;
         }
         $resultPercent = ( 100 * $newPortraitMaxHeight ) / $this->_height;
         $this->_width = \intval(
            \floor(
               ( $resultPercent * $this->_width ) / 100
            )
         );
         $this->_height = $newPortraitMaxHeight;

      }
      else
      {

         if ( $newLandscapeMaxWidth <= $this->_width )
         {
            return false;
         }
         $resultPercent = ( 100 * $newLandscapeMaxWidth ) / $this->_width;
         $this->_height = \intval(
            \floor(
               ( $resultPercent * $this->_height ) / 100
            )
         );
         $this->_width = $newLandscapeMaxWidth;

      }

      return true;

   }
public final function expandMaxSideTo2( int $newLandscapeMaxWidth, int $newPortraitMaxHeight ) : bool
   {

      $this->triggerFixedErrorByNeed( 'expandMaxSideTo2' );

      if ( $this->isPortrait() )
      {

         if ( $newPortraitMaxHeight <= $this->_height )
         {
            return false;
         }
         $resultPercent = ( 100 * $newPortraitMaxHeight ) / $this->_height;
         $this->_width = \intval(
            \floor(
               ( $resultPercent * $this->_width ) / 100
            )
         );
         $this->_height = $newPortraitMaxHeight;

      }
      else
      {

         if ( $newLandscapeMaxWidth <= $this->_width )
         {
            return false;
         }
         $resultPercent = ( 100 * $newLandscapeMaxWidth ) / $this->_width;
         $this->_height = \intval(
            \floor(
               ( $resultPercent * $this->_height ) / 100
            )
         );
         $this->_width = $newLandscapeMaxWidth;

      }

      return true;

   }
public final function expandMaxSideTo2 ( int $ newLandscapeMaxWidth , int $ newPortraitMaxHeight ) : bool { $ this -> triggerFixedErrorByNeed ( 'expandMaxSideTo2' ) ; if ( $ this -> isPortrait ( ) ) { if ( $ newPortraitMaxHeight <= $ this -> _height ) { return false ; } $ resultPercent = ( 100 * $ newPortraitMaxHeight ) / $ this -> _height ; $ this -> _width = \ intval ( \ floor ( ( $ resultPercent * $ this -> _width ) / 100 ) ) ; $ this -> _height = $ newPortraitMaxHeight ; } else { if ( $ newLandscapeMaxWidth <= $ this -> _width ) { return false ; } $ resultPercent = ( 100 * $ newLandscapeMaxWidth ) / $ this -> _width ; $ this -> _height = \ intval ( \ floor ( ( $ resultPercent * $ this -> _height ) / 100 ) ) ; $ this -> _width = $ newLandscapeMaxWidth ; } return true ; }
Expands the longest side to the defined length and also expands the shorter side to hold the proportion
of this size. The value, used as max side length is depending to the current size format.

$newLandscapeMaxWidth is used if the current size uses a landscape ord quadratic format. Otherwise the
$newPortraitMaxHeight is used.

@param  int $newLandscapeMaxWidth The max width, used if size has landscape or quadratic format.
@param  int $newPortraitMaxHeight The max height, used if size has portrait format.
@return bool
@throws \Beluga\BelugaError  If the instance is set to fixed.
Expands the longest side to the defined length and also expands the shorter side to hold the proportion of this size . The value used as max side length is depending to the current size format .