clean up formatting
simplify corner return values
cache array for mitered corner computation