#NEWLINE# def _calc_ratio( self , vals ) : #NEWLINE# #INDENT# 'Calculate an area ratio.' #NEWLINE# ( a , b ) = vals #NEWLINE# if ( not ( a or b ) ) : #NEWLINE# #INDENT# return 0 #NEWLINE# #UNINDENT# if ( abs ( a ) > abs ( b ) ) : #NEWLINE# #INDENT# ( a , b ) = ( b , a ) #NEWLINE# #UNINDENT# ratio = ( ( a / self ) if ( a and b ) else 0 ) #NEWLINE# return ( 1 - ratio )