def getRotationMatrixByPolar(arrayDictionary, polar, polarLength):
 polar /= polarLength
 arrayDictionary['_arrayRotation'] = math.degrees(math.atan2(polar.imag, polar.real))
 return matrix.Matrix(matrix.getDiagonalSwitchedTetragridByPolar([0, 1], polar))

def getRotationMatrixByPolar ( arrayDictionary , polar , polarLength ) : polar /= polarLength arrayDictionary [ '_arrayRotation' ] = math . degrees ( math . atan2 ( polar . imag , polar . real ) ) return matrix . Matrix ( matrix . getDiagonalSwitchedTetragridByPolar ( [ 0 , 1 ] , polar ) )
get rotationmatrix by polar and polarlength .