public final function reduceMinSideTo( int $newShortSideLength ) : bool
   {

      $this->triggerFixedErrorByNeed( 'reduceMinSideTo' );

      if ( $this->isPortrait() )
      {

         if ( $newShortSideLength >= $this->_width )
         {
            return false;
         }

         $resultPercent = ( 100 * $newShortSideLength ) / $this->_width;

         $this->_height = \intval(
            \floor(
               ( $resultPercent * $this->_height ) / 100
            )
         );
         $this->_width = $newShortSideLength;

      }
      else
      {

         if ( $newShortSideLength >= $this->_height )
         {
            return false;
         }

         $resultPercent = ( 100 * $newShortSideLength ) / $this->_height;

         $this->_width = \intval(
            \floor(
               ( $resultPercent * $this->_width ) / 100
            )
         );
         $this->_height = $newShortSideLength;

      }

      return true;

   }
public final function reduceMinSideTo( int $newShortSideLength ) : bool
   {

      $this->triggerFixedErrorByNeed( 'reduceMinSideTo' );

      if ( $this->isPortrait() )
      {

         if ( $newShortSideLength >= $this->_width )
         {
            return false;
         }

         $resultPercent = ( 100 * $newShortSideLength ) / $this->_width;

         $this->_height = \intval(
            \floor(
               ( $resultPercent * $this->_height ) / 100
            )
         );
         $this->_width = $newShortSideLength;

      }
      else
      {

         if ( $newShortSideLength >= $this->_height )
         {
            return false;
         }

         $resultPercent = ( 100 * $newShortSideLength ) / $this->_height;

         $this->_width = \intval(
            \floor(
               ( $resultPercent * $this->_width ) / 100
            )
         );
         $this->_height = $newShortSideLength;

      }

      return true;

   }
public final function reduceMinSideTo ( int $ newShortSideLength ) : bool { $ this -> triggerFixedErrorByNeed ( 'reduceMinSideTo' ) ; if ( $ this -> isPortrait ( ) ) { if ( $ newShortSideLength >= $ this -> _width ) { return false ; } $ resultPercent = ( 100 * $ newShortSideLength ) / $ this -> _width ; $ this -> _height = \ intval ( \ floor ( ( $ resultPercent * $ this -> _height ) / 100 ) ) ; $ this -> _width = $ newShortSideLength ; } else { if ( $ newShortSideLength >= $ this -> _height ) { return false ; } $ resultPercent = ( 100 * $ newShortSideLength ) / $ this -> _height ; $ this -> _width = \ intval ( \ floor ( ( $ resultPercent * $ this -> _width ) / 100 ) ) ; $ this -> _height = $ newShortSideLength ; } return true ; }
Decrease the shortest side to the defined length and also contracts the longer side to hold the proportion
of this size. If the current size defines a quadratic size, it is also decreased but with searching the
longer side.

@param  int $newShortSideLength
@return bool TRUE on success, or FALSE if shortest side is already shorter or equal to $newShortSideLength.
@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 . If the current size defines a quadratic size it is also decreased but with searching the longer side .