question: private boolean is16by9AspectRatio ( Size size ) { if ( size == null || size . getWidth ( ) == 0 || size . getHeight ( ) == 0 ) { return false ; } final float aspectRatio = ( size . getHeight ( ) > size . getWidth ( ) ) ? ( size . getHeight ( ) / ( float ) size . getWidth ( ) ) : ( size . getWidth ( ) / ( float ) size . getHeight ( ) ) ; return Math . abs ( aspectRatio - ( 16.f / 9.f ) ) < 0.001f ; }
target:  Calculates whether a picture size is 16:9 ratio, regardless of its orientation.