Better detection of right angles. Make sure angles are integers first.