Improve ST_TriangleDirection