Adding TriangularMod methods.