Added test and TriangleMath