Added functionality to determine triangle type