boolean fitRotate2D ( Dimension dimension ) { if ( dimension . getHeight ( ) < height ) { return false ; } return fitRotate2D ( dimension . getWidth ( ) , dimension . getDepth ( ) ) ; }
Rotate box within a free space in 2D