#NEWLINE# def corner( self , prev_dir , curr_dir ) : #NEWLINE# #INDENT# kappa = ( ( 4 * ( math . sqrt ( 2 ) - 1 ) ) / 3 ) #NEWLINE# final = pointwise ( 'add' , self . moves [ prev_dir ] , self . moves [ curr_dir ] ) #NEWLINE# control1 = pointwise ( 'mul' , kappa , self . moves [ prev_dir ] ) #NEWLINE# control2 = pointwise ( 'sub' , final , pointwise ( 'mul' , ( 1 - kappa ) , self . moves [ curr_dir ] ) ) #NEWLINE# replacements = pointwise ( 'div' , ( ( control1 + control2 ) + final ) , 2.0 ) #NEWLINE# return ( 'c %s,%s %s,%s %s,%s ' % tuple ( replacements ) )