def is_in_t(pt):
    """Checks if a point is in the template triangle T.

       :param pt: The point to be checked.
       :type pt: tuple(float,float).

       :returns: True if pt is in T.
       :rtype: bool.
    """
    flag = True
    if pt[0] < 0 or pt[1] < 0:
        flag = False
    if pt[0] + pt[1] > 1:
        flag = False
    return flag