TriangleType2 Final commit with tests