public final function reduceMinSideTo2( int $newLandscapeMaxHeight, int $newPortraitMaxWidth ) : bool
   {

      $this->triggerFixedErrorByNeed( 'reduceMinSideTo2' );

      if ( $this->isPortrait() )
      {

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

      }
      else
      {

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

      }

      return true;

   }
public final function reduceMinSideTo2( int $newLandscapeMaxHeight, int $newPortraitMaxWidth ) : bool
   {

      $this->triggerFixedErrorByNeed( 'reduceMinSideTo2' );

      if ( $this->isPortrait() )
      {

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

      }
      else
      {

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

      }

      return true;

   }
public final function reduceMinSideTo2 ( int $ newLandscapeMaxHeight , int $ newPortraitMaxWidth ) : bool { $ this -> triggerFixedErrorByNeed ( 'reduceMinSideTo2' ) ; if ( $ this -> isPortrait ( ) ) { if ( $ newPortraitMaxWidth >= $ this -> _width ) { return false ; } $ resultPercent = ( 100 * $ newPortraitMaxWidth ) / $ this -> _width ; $ this -> _height = \ intval ( \ floor ( ( $ resultPercent * $ this -> _height ) / 100 ) ) ; $ this -> _width = $ newPortraitMaxWidth ; } else { if ( $ newLandscapeMaxHeight >= $ this -> _height ) { return false ; } $ resultPercent = ( 100 * $ newLandscapeMaxHeight ) / $ this -> _height ; $ this -> _width = \ intval ( \ floor ( ( $ resultPercent * $ this -> _width ) / 100 ) ) ; $ this -> _height = $ newLandscapeMaxHeight ; } return true ; }
Decrease the shortest side to the defined length and also contracts the longer side to hold the proportion
of this size. The value, used as max side length is depending to the current size format.

$newLandscapeMaxHeight is used if the current size uses a landscape ord quadratic format. Otherwise the
$newPortraitMaxWidth is used.

@param  int $newLandscapeMaxHeight The max height, used if size has landscape or quadratic format.
@param  int $newPortraitMaxWidth   The max width, used if size has portrait format.
@return bool
@throws \Beluga\BelugaError  If the instance is set to fixed.
Decrease the shortest side to the defined length and also contracts the longer side to hold the proportion of this size . The value used as max side length is depending to the current size format .